Reputation: 275
I want to draw a logo(3D awards) at the corner of the window(fixed position when change camera)
Upvotes: 0
Views: 1275
Reputation: 10115
here is my code for drawing fullscreen rectangle (in old opengl)
glMatrixMode(GL_PROJECTION);
glPushMatrix();
glLoadIdentity();
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glLoadIdentity();
glBegin(GL_QUADS);
glTexCoord2f( 0,0 );
glVertex3d( -1.0,-1.0, 0 );
glTexCoord2f( 1,0 );
glVertex3d( 1.0,-1.0, 0 );
glTexCoord2f( 1,1 );
glVertex3d( 1.0, 1.0, 0 );
glTexCoord2f( 0,1 );
glVertex3d( -1.0, 1.0, 0 );
glEnd();
glMatrixMode(GL_PROJECTION);
glPopMatrix();
glMatrixMode(GL_MODELVIEW);
glPopMatrix();
just disable depth buffer abd set the texture to be able to draw your logo in front of eferything Of course you can change the position and the size of it
Upvotes: 1
Reputation: 35933
Could do it like so:
Upvotes: 1