View Full Version : glClear(GL_COLOR_BUFFER_BIT)

Robin Forster
09-30-2001, 04:51 PM
I set my viewport to


then when I clear the color buffer it clears 800x600!!!

I did a glGetIntegerv(GL_VIEWPORT) and it returns my 600x400 viewport. Without this working correctly I get a framerate of 4 fps. (because I must update my menus every frame; they are direct to framebuffer)


10-01-2001, 12:08 AM
glClear is not affected by the viewport. It will clear the entire window. If you want to clear only a part of the viewport, you must use glScissor.