Jump to content
  • Advertisement


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


draw arena...

This topic is 5577 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

Hi, I want to draw something like an arena in my opengl window. This would be like a bunch of quads that make the borders of my window... How can I do this? How can I findthe edges of my window? Thanks

Share this post

Link to post
Share on other sites
I don't know exactly what you mean, but it seems that you want to make a frame around the outside of your OpenGL window. This is simple. To get the "edges" of your window, call the following function:

GLint iViewport[4];
glGetIntegerv(GL_VIEWPORT, iViewport);
This will return a array containing the top, left, height and width of the current viewport (which is usually the whole window). Then, you switch to orthographic mode, and draw the quads based on what's returned as the viewport. Post again if that isn't what you were talking about, or you don't get it

Coding Stuff ->  [ iNsAn1tY Games | DarkVertex | How To Do CSG | Direct3D Vs. OpenGL | Google ]
Fun Stuff    ->  [ Evil T-Shirts | Stick-Based Comedy | You're Already Here | The Best Film Reviews ]

[edited by - iNsAn1tY on March 16, 2003 7:17:18 AM]

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!