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


draw arena...

Recommended Posts

FreJa    154
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
iNsAn1tY    476
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