EDIT:
Ok, so I fixed my texture not showing (really stupid mistake that even I could find) but there’s one more issue. Here’s my code for drawing my custom cursor
glPushMatrix();
glTranslatef(x, y, 0);
glColor3f(1.0f, 1.0f, 1.0f);
glBegin(GL_TRIANGLES);
glVertex2f(0, 0);
glVertex2f(14, 16);
glVertex2f(2, 18);
glEnd();
glPopMatrix();
but no matter what color I set, it’s always black. Any idea why that might be?
EDIT AGAIN: Apparently when I call glDisable(GL_TEXTURE_2D) before I draw the cursor, it shows up in color. Do I really have to keep calling glEnable and glDisable for GL_TEXTURE_2D to draw my cursor, or is there a better way?
| Nathan
It’s sampling texture data per vertex, which it might not need to if texturing is disabled; therefore maybe it would be “MUCH FASTER” in a different benchmark. Also, it may lead you to issues depending on how the driver implements the default texture. It usually works, and lots of people do it, but that doesn’t mean it’s necessarily the safest/best practice. 