PDA

View Full Version : drawing



helda
11-19-2002, 12:43 AM
Hello
i have a small problem, how can i draw a quad over the complete near clip plane?

thank you for answer

helda

rIO
11-19-2002, 02:38 AM
The easiest way is to set an orthographic view and draw a 2d quad over the entire screen...

The following code should do the job...

glViewport(0,0,S_WIDTH,S_HEIGHT);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(0,S_WIDTH,S_HEIGHT,0,-1,1);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();

then draw a quad from 0,0 to S_WIDTH,S_HEIGHT

hope this helps