Advertisement

glViewport

Started by November 13, 2000 06:42 PM
0 comments, last by Bruce2 24 years ago
Isn''t glViewport supposed to limit the area where OpenGL will display to? If I use the following code the entire Windows client area turns green rather than just the (0,0)-(100,100) area. Is the glClear(GL_Color_Buffer_Bit) not restricted to just the viewport? glViewport(0, 0, 100, 100); glClearColor(0.0, 1.0, 0.0, 1.0); glClear(GL_Color_Buffer_Bit); (I''m using Delphi) Thanks for any help, Bruce
no, clear affects the whole buffer...
the viewport is used in the transformations of coordinates...

Use glScissor if you want to restrict drawing to a specific rectangle...

This topic is closed to new replies.

Advertisement