glClearColor+WM-SIZE+only part is cleared

Hi everyone,
I’m writing application (WinAPI+VS 2005).

I have created window and on WM_PAINT i’m clearing the buffer with a specified color. The problem is that when i changing the width of the window the new part that appears is not colorized.
Seems like OpenGL remembers the initial size of the window and repaints only it.

I’m creating the window with WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN|WS_CLIPSIBLINGS styles. Using default width and height. After creation i’m retreiving device context and set pixel format.
On WM_SIZE and WM_PAINT i do the following:


view_port_width,view_port_height are window width and height. As far as i understand they do not have to affect the clorized area.
What i’m doing wrong?

Which OS, GPU, driver are you using?
What information do you get from GL?

I’m using winXP SP3. glGetString(GL_VERSION) returns
“1.4.0 - Build”. I’m using integrated video board:
Intel® 82945G Express Chipset Family.

Are you using the scissor box? If you are, disable scissoring with glDisable(GL_SCISSOR) before clearing the screen.

Yes. That was the issue. I was experimenting with the code and enabled it. Thanks a lot.

Don’t forget to re-enable scissoring afterwards.