PDA

View Full Version : glViewport



V-man
03-07-2005, 04:19 AM
Quick question. The spec doesn't say anything about glViewport's x and y parameters.
Can they be any value?
Can I put negative values here and hope it won't cause trouble on cheap video cards with cheap drivers that only support GL 1.1?
What if I put a large negative number like glViewport(-1000 , -1000, width, height)?

Bob
03-07-2005, 04:31 AM
You can pass any values you like. The viewport doesn't do anything but defining the transform from normalized device coordinates to window coordinates, so if parts of the viewport falls outside the window, then you will only see the part of the viewport that is actually inside the window.

V-man
03-08-2005, 04:54 PM
I know it's just a transform the way GL defines, but I was wondering if there is some graphics card that will have issues with it because it's not typical to do this.