🔒 Locked
Opengl frames
Advertisement
Original Post
He probably uses scissor testing, from what I can tell from the screen shots.


Ok, that brings up another question I have been meaning to ask. What exactly (ok, not exactly, just generally) does the glViewport() command do? I have tried playing around with it, but I can''t seem to understand what it does. I read the documentation on msdn, but I am unclear on a few (read: many) things. When it refers to "affine coordinates" and "normalized device coordinates," what is it talking about?
Thanks for the help,
diddly
Thanks for the help,
diddly
glViewport controls the window coordinates, where in the window will the GL scene be drawn.
Imagine you have a window origin (0,0) dimensions (w,h).
glViewport(0,0,w,h) makes you render to the whole window
glViewport(0,0,w/2,h/2) makes you render to the upper-left quarter.
Documents [ GDNet | MSDN | STL | OpenGL | Formats | RTFM | Asking Smart Questions ]
C++ Stuff [ MinGW | Loki | SDL | Boost. | STLport | FLTK | ACCU Recommended Books ]
Imagine you have a window origin (0,0) dimensions (w,h).
glViewport(0,0,w,h) makes you render to the whole window
glViewport(0,0,w/2,h/2) makes you render to the upper-left quarter.
Documents [ GDNet | MSDN | STL | OpenGL | Formats | RTFM | Asking Smart Questions ]
C++ Stuff [ MinGW | Loki | SDL | Boost. | STLport | FLTK | ACCU Recommended Books ]
quote:
Original post by diddly-yo
How are the coordinates numbered? Is (0, 0) the upper left or bottom left corner?
diddly
glViewport
bottom left, but checkout the MSDN for further information on the function, as well as all OpenGL functions....
To the vast majority of mankind, nothing is more agreeable than to escape the need for mental exertion... To most people, nothing is more troublesome than the effort of thinking.
I guess that''s how you would do split screen rendering, as well? Like, for a simultaneous two player game?
yeah, i''ll have to try it out. I always thought it would be really cool. I was thinking left and right though, not top and bottom, but either way it''s basically the same. Or, i guess you could make it configurable which way the split goes. I guess it''s a totally different thing, rendering to two different monitors at the same time?? Like, if the video card has dual monitor support. I imagine that would be card specific code? Does anyone know?
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement