This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Load eigen transform into OpenGL

Tags: None
(comma "," separated)
rendalyn
Registered Member
Posts
2
Karma
0

Load eigen transform into OpenGL

Fri Apr 02, 2010 8:15 pm
Hello, I am trying to load an Eigen transformation matrix into OpenGL while
drawing some objects.

In the tutorial on Geometry it says that I can accomplish this simply by
doing

glLoadMatrixf(transform.data());

However this isn't working.

I've tested that the transform is what I want by using it to transform
a single point and printing out the result, to confirm that it ends up
in the expected location.

I know that the code to draw the OpenGL objects works because when I simply
do

glPushMatrix();
glLoadIdentity();
// draw all my stuff here
glPopMatrix();

Everything appears on the screen where I expect it to.


Can anyone help me figure out why is it that when I do this:

glPushMatrix();
glLoadMatrixf(transform.data());
// draw stuff here
glPopMatrix();


Nothing appears on the screen?


Thanks
rendalyn
Registered Member
Posts
2
Karma
0
Found out that I needed to use glMultMatrix instead, since somebody else's code was modifying the model view matrix beforehand ...

Sorry, but thanks to anyone who looked.


Bookmarks



Who is online

Registered users: abc72656, Bing [Bot], daret, Google [Bot], Sogou [Bot], Yahoo [Bot]