I’m just learning opengl (LWJGL), having an issue.
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(0,width,0,height,1,-1);
glMatrixMode(GL_MODELVIEW);
glEnable(GL_TEXTURE_2D);
glClearColor(0,0,0,1);
(width = 800, height = 600)
and then the drawing code
glBegin(GL_QUADS);
glTexCoord2f(0,1);
glVertex2f(100,200);
glTexCoord2f(0,0);
glVertex2f(100,100);
glTexCoord2f(1,0);
glVertex2f(300,100);
glTexCoord2f(1,1);
glVertex2f(300,200);
glEnd();
The texture I am attempting to draw (http://lwjgl.org/webstart/logo.png) is showing upside down. Is there a particular order I need to draw in? I thought it was just anticlockwise, and that only mattered in 3d to make it face you.
Also, the texture isnt being draw fully, bits are missing around one edge (http://img3.imageshack.us/img3/8758/problemcy.jpg). I've refilled the image with white just to check I hadn't accidentally enabled some sort of transparency in opengl.