I’m not sure if this is a bug in the code, but I ran across something that might cause problems for people.
In ofGraphics.cpp (line 411-417), in the matrix multiplications:
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(screenFov, aspect, nearDist, farDist);
gluLookAt(eyeX, eyeY, dist,
eyeX, eyeY, 0.0, 0.0, 1.0, 0.0);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
I believe that the gluLookAt(…) should be multiplied with the model view matrix, not the projection matrix (make it the last function call in this block). I only stumbled upon this because I’m trying to use openFrameworks with a cluster graphics library called CGLX and I discovered my screen was blank. I traced my problem to this line and thought I should let everyone know in case it really is a bug.
So here is the new block with what I changed… nothing drastic.
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(screenFov, aspect, nearDist, farDist);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
gluLookAt(eyeX, eyeY, dist,
eyeX, eyeY, 0.0, 0.0, 1.0, 0.0);
I know it’s obscure but I hope it helps someone out there! =)