Original Post
I use a 512x512 texture as a background of the main menu of the game. I have added some menuitems there with normal fonts, createfont etc. If I put the texture on the backgound, the menuitems dont activate as quick as they did before(if you push up, menuitem text changes color). So is there an easy way to do this working? I think the problem is the large quad on the background.. Here some code:
void PiirraMenu(GLuint menutausta, int valittu)
{
glEnable(GL_TEXTURE_2D);
glMatrixMode(GL_PROJECTION);
glBindTexture(GL_TEXTURE_2D, menutausta);
glBegin(GL_QUADS);
glTexCoord2f(0, 1);
glVertex2f(-400, -300);
glTexCoord2f(0, 0);
glVertex2f(-400, 300);
glTexCoord2f(1, 0);
glVertex2f(400, 300);
glTexCoord2f(1, 1);
glVertex2f(400, -300);
glEnd();
glDisable(GL_TEXTURE_2D);
if(valittu == 1)
glColor3f(1, 1, 1);
else
glColor3f(0, 0, 0);
glRasterPos2f(0, 100);
glPrint("NEW GAME");
if(valittu == 2)
glColor3f(1, 1, 1);
else
glColor3f(0, 0, 0);
glRasterPos2f(0, 40);
glPrint("OPTIONS");
if(valittu == 3)
glColor3f(1, 1, 1);
else
glColor3f(0, 0, 0);
glRasterPos2f(0, -20);
glPrint("HISCORES");
glColor3f(1.0f, 1.0f, 1.0f);
return;
}