My texture IS aligned! >:)

I’m putting a 256x256x32 bitmap on this quad and it looks great except its offset to the right about 10% and raises 1 pixel at the edge of the tile. Is there anything that could cause this?

glBegin(GL_QUADS);
glTexCoord2f(1.0, 0.0); glVertex3f(-2.0, 2.0, 2.0);
glTexCoord2f(1.0, 1.0); glVertex3f( 2.0, 2.0, 2.0);
glTexCoord2f(0.0, 1.0); glVertex3f( 2.0,-2.0, 2.0);
glTexCoord2f(0.0, 0.0); glVertex3f(-2.0,-2.0, 2.0);
glEnd();

chances are the problem is in your texture loading routine.

You’re right, but my routine was fine. The problem was with the .bmp format. Photoshop has an option to save a .bmp and “exclude non-image data”… this option removes the header information and offsets the texture to the right by 20 pixels or so. (wtf?)

My texture loading routine worked fine on a normal photoshop 5.5 .bmp file after I skipped the first 54 bytes.

This is just silly, I never would have investigated if you hadn’t said that.

check out the bmp file specs i believe the url is http://www.wotsit.org/

Just bookmarked the link, that answered another question of mine already. Sorry about that second post of mine… I was a little frustrated at the time. I understand why it was offset now.

27 pixels by any chance?