I want to texture a simple quad with a texture loaded from an img (in .Net with C#)
- I load the bitmap
- I call
Gl.glTexImage2D(Gl.GL_TEXTURE_2D, 0, 3, this.iTexWidth, this.iTexWidth, 0, Gl.GL_BGR_EXT, Gl.GL_UNSIGNED_BYTE, this.tex2.getImageData());
- and I set the quad with
Gl.glBegin(Gl.GL_QUADS);
Gl.glTexCoord2f(0.0f, 1.0f);
Gl.glVertex3f(0.0f, 0.0f, 0.0f);
Gl.glTexCoord2f(1.0f, 1.0f); Gl.glVertex3f(5.0f, 0.0f, 0.0f);
Gl.glTexCoord2f(1.0f, 0.0f); Gl.glVertex3f(5.0f, 5.0f, 0.0f);
Gl.glTexCoord2f(0.0f, 0.0f);
Gl.glVertex3f(0.0f, 5.0f, 0.0f);
Gl.glEnd();
but I get a quad with a mirrored texture - which is not the intented result … has anyone suggestions here …
tnx