Hi,
Since the projection pipeline is performed in homogeneous coordinates, shouldn’t a negation of the projection matrix have no effect on the projection?
Here is the code I use:
glClearColor(0.0,0.0,0.0,0.0);
glClear(GL_COLOR_BUFFER_BIT);
glDisable(GL_BLEND);
glDisable(GL_DEPTH_TEST);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glFrustum(-1.0,1.0,-1.0,1.0,1.0,10.0);
//negation
GLfloat p[16];
glGetFloatv(GL_PROJECTION_MATRIX,p);
for (int i=0;i<16;++i)
p[i]=-p[i];
glLoadMatrixf(p);
glColor3f(1.0,1.0,1.0);
glPointSize(5.0);
glBegin(GL_POINTS);
glVertex4f(0.0,0.0,-2.0,1.0);
glEnd();
glutSwapBuffers();
checkErrors();
It displays the point if I skip the negation, otherwise it doesn’t. Could this be a bug in the 66.0 forceware driver I use or have I overlooked something?
Greetz,
Nico