i have a problem with reshape function if it is not registered with glut
glutReshapeFunc(reshape);
everything looks good but when it is registered the screen is showed only once and then black screen
the code:
void reshape ( int w, int h ) // Create The Reshape Function (the viewport)
{
float ratio;
if(h == 0)
h = 1;
ratio = 1.0f * w / h;
// Reset the coordinate system before modifying
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
// Set the viewport to be the entire window
glViewport(0, 0, w, h);
// Set the clipping volume
gluPerspective(80,ratio,1,200);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
gluLookAt(0, 0, 0,
0,0,-1,
0.0f,1.0f,0.0f);
}



