I followed the NeHe tutorial here: http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=24
I can load Targas and use them as textures but I’ve encountered a problem and I don’t know how to solve it.
The two images are using the same drawing code. The only difference is that the targa file in the first image was saved at 32 BPP and the targa in the second image was saved at 24 BPP.
There is no transparency in the image.
As you can see, the 24BPP file draws misaligned. The only change is a resave of the image at a different BPP.
Here is the code I’m using to draw:
glColor4f(1.0f, 1.0f, 1.0f, mTransparency);
glTranslatef(x, y + height, 0); // Move to bottom left of image
glRotatef(mRotation, 0, 0, 1);
glTranslatef(-x, -(y + height), 0.0f); // Reverse move
glTranslatef(x, y, 0);
glVertex2d(0, height + 1); // Bottom Left Of The Texture and Quad
glVertex2d(width + 1, height + 1); // Bottom Right Of The Texture and Quad
glVertex2d(width + 1, 0); // Top Right Of The Texture and Quad
glVertex2d(0, 0); // Top Left Of The Texture and
Can anyone tell me why this occurs?