View Full Version : is glScissor redundant to glViewport?
is glScissor redundant to glViewport?
12-22-2002, 02:41 PM
Nope...not to my knowledge. You see glScissor takes the existing viewport and crops it. The glViewport just sets up a new one. For example, say i wanted to have the widescreen bars but still keep the 4:3 ratio, i'd use glScissor, because it doesn't change the viewport it just cuts it.
Say you wanted to rendertwo different scenes at once on the screen...what you would do is glScissor the viewport so that only the left half of it is vissible and draw the first scene. When the code for it is over in the render procedure you would glScissor the viewport to the right half and then render the second scene there. If you didn't have the glScissor call, you would still be rendering the scenes at the right locations but you couldn't set a different background to each side.
12-22-2002, 11:15 PM
yup. moreover for the second exmaple (split-screen) I would also use glViewport in order to setup an easier projection.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.