Skip to main content
gamedev.net
🔒 Locked

lesson6 on linux

Started by brandonturner 4 replies 400+ views
Original Post
brandonturner
brandonturner
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 you need to take the ''t'' off the front of it and put it in folder "data/lesson6/" www.msu.edu/~turnerb7/tNeHe.bmp
snisarenko
snisarenko
I think the image is supposed to be 256 x 256 (not 255 x 255)
brandonturner
brandonturner
quote:
Original post by snisarenko
I think the image is supposed to be 256 x 256 (not 255 x 255)


good call. i didnt account for the zero pixel. side note: why does it have to be that size, where in the code does it force this?
chowe6685
chowe6685
opengl requires textures to have power of two dimensions unless you use extensions
brandonturner
brandonturner
quote:
Original post by chowe6685
opengl requires textures to have power of two dimensions unless you use extensions


what do you mean? how was i supposed to know it had to be 256x256? i dont see it in code anywhere, do i havce to measure the serfaces or something?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.