Quote:Original post by Surfman19
hey,
thx, now its works fine;) why do you define a const int MAX_OBJECTS? my texture is a .bmp and it only works with GL_BGRA at the glTexImage2D!
bye
I use MAX_OBJECTS to set the array length. It is a value I use often, so it is easier to set it once than reading the whole code and change every occurrence.
And about GL_BGRA vs. GL_RGB that's strange... I got a seg fault without it, but it could have been another point of the code. It seems that your .bmp is a 32 bit image (what is the pourpose of the .jpg, by the way?) so you're right: GL_BGRA should be the correct flag. But I would expect you to use 4 bytes in the texture creation function, not 3...
Well, the important thing is that it works. Understanding also 'how' and 'why' would be asking too much ;-)