123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|731|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> C/C++/C#/Other -> OpenGL + Drawing by onscreen position

Sun, 27 Dec 2009, 23:42
Flame The Great
Flame here!

Man, it's been awhile since I last posted, but I have a quick question that hopefully does not require that I become a brain surgeon.

I have an OpenGL game using SDL in CPP (I guess the site hates plus signs). I am writing up a graphics system to make processing everything easier. I am trying to get the drawing functions to work for both 3D and 2D use, and to save myself the complication, I'm trying to get the 2D portion to work. By drawing a basic box using glVertex commands, I want to find a way to position the box based on screen positions (like drawing a 50px by 50px box at position 200, 100). Sadly though I'm having a hard time trying to link the screen dynamics with the positioning.

I was wondering if anyone has tried this before and might have some insight as to how to get this to work.