PDA

View Full Version : pics in OpenGL



02-16-2001, 03:56 AM
i'd like to know how to paste pictures on the background of the screen or at least manipulate them in opengl

02-16-2001, 05:40 AM
Their is a lot of way to do this. Generaly you
for exemples, before drawing other objects,
disable the Zbuffer with glDepthMask(GL_FALSE);

*) draw your picture with glCopy??(I can't remenber what but it is written in the Red Book at bitmap section).
*) or draw a quad with the image you want to draw as a Quad texture

enable the Zbuffer. glDepthMask(GL_TRUE).

A cool thing is to switch to a cool projection mode like
glMatrixMode(GL_PROJECTION);
glOrtho(0,640,0,480,-1,1);

with this you can specify the x and y of your picture using

glRasterPos2i(320,200);