-
BMP Texture problems
I try to diplay a texture, and only some type of BMP Files works...
Why??? And how to read a Gif or a Jpg file ??
Thanks
Le Bayonnais
-
Re: BMP Texture problems
I think you have to use a certain size for the bitmap file you are loading. such as a power of 2 (think binary)
32x64
or something like that, dont use wierd sizes like 33x101, loaders just dont like that
you need to get a reader program if you want to use .jpg, .gif, .rgb, or anything for that matter!
there are some exaples in the siggraph section of opengl.org's tutorials
-
Re: BMP Texture problems
Well, it doesn't really matter... It has something to do with the data alignment. Are you using glPixelStore? Something like:
glPixelStoref(GL_UNPACK_SWAP_BYTES, 0);
glPixelStoref(GL_UNPACK_SKIP_ROWS, 0);
glPixelStoref(GL_UNPACK_SKIP_PIXELS, 0);
glPixelStoref(GL_UNPACK_ALIGNMENT, 4); // word alignment
This controls how data is read from client memory.
-
Junior Member
Regular Contributor
Re: BMP Texture problems
You may have the problem of trying to load a 256 color bitmap when your loader is set up for RGB or RGBA bitmaps. (8 bit, 24bit, 32bit) so make sure your bitmaps are all the correct format for your loader. If you post the loader source code we can look to see what may be going wrong.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules