Quote:Original post by LilBudyWizer
I doubt it took your glFrustum call since near is never suppose to 0 since that would make the projection matrix singular. So I would assume you have the default frustum.
You are correct. I checked and glGetError() was returning GL_INVALID_VALUE.
I've modified my code. I'm no longer getting an error. Why is the square still not visible?
GLenum err; glMatrixMode(GL_PROJECTION); glLoadIdentity(); glFrustum(-320, 320, -240, 240, 1, 10); err = glGetError(); if(err!=0) { MessageBox(NULL, "You dun screwed up!", "Arrr!", MB_OK); } glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glClearColor(0, 0, 0, 0); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glColor3f(1, 1, 1); glTranslatef(0, 0, 2); glBegin(GL_POLYGON); glVertex3f(-0.5f, -0.5f, 0); glVertex3f(0.5, -0.5f, 0); glVertex3f(0.5, 0.5f, 0); glVertex3f(-0.5, 0.5f, 0); glEnd(); return true;
Your help is appreciated.