Hi !
I want to display a small bitmap as the logo on the screen. I tried with the following code, but I’m not getting any output.
Can someone please help me out on this ?
glBindTexture(GL_TEXTURE_2D, Logo.TextureID);
glDisable(GL_DEPTH_TEST);
glMatrixMode(GL_PROJECTION);
glPushMatrix();
glLoadIdentity();
glOrtho(0,800,0,600,-1,1);
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
glLoadIdentity();
glTranslated(10,600 - 10,0);
glBegin(GL_QUADS);
glTexCoord2f(0.0f, 0.0f); glVertex3i(x,y);
glTexCoord2f(1.0f, 0.0f); glVertex3i(x+width,y);
glTexCoord2f(1.0f, 1.0f); glVertex3i(x+width,y+height);
glTexCoord2f(0.0f, 1.0f); glVertex3i(x,y+height);
glEnd();
glMatrixMode(GL_PROJECTION);
glPopMatrix();
glMatrixMode(GL_MODELVIEW);
glPopMatrix();
glEnable(GL_DEPTH_TEST);
Thanks !