🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

OpenGL real screen coordinates

Started by
3 comments, last by drago 24 years, 7 months ago
To the best of my knowledge the OpenGL origin is in the center of the screen. Therefore, the upper left corner is (-screenwidth/2, -screenheight/2).

- Splat

Advertisement
Yeah, the OpenGL origin is at the center, but the upper left corner isnt -screenwidth/2.. Can you show me your setup functions? at least those concerning the coordinate system... thanks in advance

------------------
Drago

osu!
Umm, to be honest, I have never used OpenGL in my life. However, you could check out www.opengl.org There are a bunch of tutorials that contain code for GL setup.

- Splat

Hi,

how can i render textured quads with OpenGL like with DirectDraw... for example with DirectDraw you give real screen coordinates like at pixel 100,100 with the O at the upper-left corner, now i dont care in wich corner the origin is, i only want to render using real screen coordinates. How can i do this?

------------------
Drago

osu!
Use the glOrtho function to create an orthographic parallel viewing volume. You specify the left, right, top, and bottom coordinates of the window. This doesn't use real screen coordinates, but this is for the best as you won't have to change all of your code just to run your program at a different resolution.

This topic is closed to new replies.

Advertisement