PDA

View Full Version : glClear(GL_COLOR_BUFFER_BIT)



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

glViewport(100,124,600,400);

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)

HELP!

Bob
09-30-2001, 11:08 PM
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.