PDA

View Full Version : Static Quad



guju
08-22-2002, 11:09 AM
Hi there!
I want to display a quad at the right corner of my display. It should be not affected by any mouse movements. I made it already for perspective view like following:
yhelp=tan(float(ViewAngle)*3.14159/360.)*4.*ModellRadius;
xhelp=float(instance->window_w)/float(instance->window_h)*yhelp;
and then i generate the quad at this position
But for ortho view i have problems. I used:
yhelp=BoxTop-BoxBottom;
xhelp=BoxRight-BoxLeft;
It does not work! Can you please help!!
Thanks
Juergen

davepermen
08-22-2002, 01:21 PM
just reset your matrices. glLoadIdentity() is the keyword..

guju
08-22-2002, 08:10 PM
I just do like this:
glMatrixMode( GL_PROJECTION );
glPushMatrix();
glLoadIdentity();

glBegin(GL_QUADS)
//** Draw
glEnd();

glPopMatrix();
But where can i draw my quad, that it is on the screen. Should i use in ortho mode the box left coordinates and the near plane?
Thanks
Juergen