View Full Version : loading bitmap as 2d texture.

04-29-2004, 07:01 PM
im really new to opengl. i just started today pretty much. im on lesson6 of NeHe lessons. I'm using a ported to linux version. All i wanted to do was change the bitmap. So i mean, i dont even see why this would matter. I replaced NeHe.bmp with my own, they are the same size 255x255 pixels. I'm not sure if it is 24 bit though, i dont know how to check that in gimp. Anyways, when i run the program the texture is all white. if i put his old one back it works. i get no errors, and it checks to make sure it 24 bit in the code(and doesnt error out, so im guessing it is 24). anyone know why it is like this?

www.msu.edu/~turnerb7/lesson6.c (http://www.msu.edu/~turnerb7/lesson6.c)
you need to take the 't' off the front of it and put it in folder "data/lesson6/"
www.msu.edu/~turnerb7/tNeHe.bmp (http://www.msu.edu/~turnerb7/tNeHe.bmp)

04-30-2004, 12:45 AM
Make the texture 256x256 instead. 255 is not a power of two.