problem with resizing

I’m drawing a simple pentagon on the screen and it has a callback reshape function, but when the window is reshaped (resized) nothing changes. When this same reshape function is placed in the program where I originally got it from, it resizes the drawing in relation to the window.

This is the reshape function:

void reshape (int w, int h)
{
glViewport (0, 0, (GLsizei) w, (GLsizei) h);
glMatrixMode (GL_PROJECTION);
glLoadIdentity ();
gluOrtho2D(Vx_min, Vx_max, Vy_min, Vy_max);
glMatrixMode (GL_MODELVIEW);

}

It’s called using:

glutReshapeFunc(reshape);

Again this works with one program, but not the other. Any ideas?

Never mind, I fixed it. Unfortunately I don’t really know why, but eliminating this line in the display callback function did it:

glGetFloatV(GL_CURRENT_COLOR, color);

Color is a valid float array and this code actually works, but is also prevents resizing somehow. Maybe when it was trying to get the screen state, it interrupted the resize process.