Hi all,
I have added the following to the draw function of the basic_template:
//--------------------------------------
glTranslatef(-1.5f,0.0f,-6.0f); // Move Left 1.5 Units And Into The Screen 6.0
glBegin(GL_TRIANGLES); // Drawing Using Triangles
glVertex3f( 0.0f, 1.0f, 0.0f); // Top
glVertex3f(-1.0f,-1.0f, 0.0f); // Bottom Left
glVertex3f( 1.0f,-1.0f, 0.0f); // Bottom Right
glEnd(); // Finished Drawing The Triangle
glTranslatef(3.0f,0.0f,0.0f); // Move Right 3 Units
glBegin(GL_QUADS); // Draw A Quad
glVertex3f(-1.0f, 1.0f, 0.0f); // Top Left
glVertex3f( 1.0f, 1.0f, 0.0f); // Top Right
glVertex3f( 1.0f,-1.0f, 0.0f); // Bottom Right
glVertex3f(-1.0f,-1.0f, 0.0f); // Bottom Left
glEnd();
//-------------------------------------------
Some may notice, that this is directly from NEHE’s lesson02
The odd behavior that I am seeing is that when I resize the window, the objects appear to stretch for some number of pixels, then they snap back to their original size, only to start stretching again as I continue to enlarge the window.
In GLUT, the objects would grow consistantly in the X and Y plane.
I bet this is some difference that I am not seeing between the perspective, and viewpoint options between the GLUT and CPW programs but that code appears to be the same.
Any ideas?
Thanks,
John