Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

diddly-yo

Opengl frames

This topic is 5888 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Can someone please explain (or give a hint or suggestion, anything) how to create "sub windows" like those used in Nate Robins'' GL Tutors (http://www.xmission.com/%7Enate/tutors.html) without using glut? I feel like I''ve run into a brick wall with my project. Thanks, diddly

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


Link to post
Share on other sites
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 ]

Share this post


Link to post
Share on other sites
Oh right, so is that how the picture-in-picture in Counter-strike is done?

Henrym

[edited by - henrym on June 2, 2002 5:06:54 PM]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Yep. Just set the viewport to the top half of the screen, render for player 1, set vieport to bottom half, render for player 2.

Be sure you set the perspective correctly. Instead of the windowheight, use windowheight/2.

Sander Maréchal

[Lone Wolves Production][Articles][E-mail]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!