Advertisement

Rendering 2D in screen position?

Started by March 26, 2002 01:31 PM
-1 comments, last by Phobeus 22 years, 11 months ago
Hey, guys, I seek arround in the forum for a while a got some source running up (mention it''s delphi :=) ) But it seems like the orgin of the screen (0/0) is at the left bottom... is that normally in OpenGl or is something wrong here? If not, any possbilitiy to translate the screen so, that the left top is the orgin? thx in advise, Phobeus --- glMatrixMode(GL_PROJECTION); glLoadIdentity; glOrtho(0,800,0,600,1,0); glMatrixMode(GL_MODELVIEW); glPolygonMode(GL_FRONT,GL_FILL); glLoadIdentity(); glDisable(GL_DEPTH_TEST); glDisable(GL_CULL_FACE); glTranslatef(0,0,-0.1); glEnable(GL_BLEND); glBindtexture(GL_TEXTURE_2D,texture[2]); glBegin(GL_QUADS); glTexCoord2f(0,0); glVertex2d(10,0); glTexCoord2f(1,0); glVertex2d(200,0); glTexCoord2f(1,1); glVertex2d(200,200); glTexCoord2f(0,1); glVertex2d(10,200); glEnd; glEnable(GL_CULL_FACE); glDisable(GL_BLEND); glEnable(GL_DEPTH_TEST); glPolygonMode(GL_FRONT,GL_FILL);
Please visit http://dgl.thechaoscompany.net - A german site for delphi opengl programmers!

This topic is closed to new replies.

Advertisement