View Full Version : My texture IS aligned! >:)
07-25-2001, 10:51 PM
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?
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);
chances are the problem is in your texture loading routine.
07-26-2001, 11:53 AM
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. http://www.opengl.org/discussion_boards/ubb/smile.gif
check out the bmp file specs i believe the url is http://www.wotsit.org/
07-28-2001, 12:17 AM
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. http://www.opengl.org/discussion_boards/ubb/wink.gif
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.