glViewport
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
November 13, 2000 06:44 PM
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...
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
Popular Topics
Advertisement