Results 1 to 4 of 4

Thread: BMP Texture problems

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2000

    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 ??
    Le Bayonnais

  2. #2
    Junior Member Newbie
    Join Date
    Mar 2000

    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)
    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's tutorials

  3. #3

    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.

  4. #4
    Member Contributor
    Join Date
    Feb 2000
    Brisbane,QLD, Australia

    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.

Similar Threads

  1. Problems Texture Mapping with Float Texture
    By CelticBlues in forum OpenGL: GLSL
    Replies: 21
    Last Post: 02-08-2009, 04:13 AM
  2. More texture problems: here we go....again!
    By gui24a in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 08-25-2008, 12:30 PM
  3. Texture Problems ...
    By Saintex in forum OpenGL: Basic Coding
    Replies: 8
    Last Post: 07-22-2002, 07:38 AM
  4. Texture Problems
    By spectrum in forum OpenGL: Basic Coding
    Replies: 8
    Last Post: 01-09-2002, 02:58 AM
  5. AVI texture problems
    By dmsy in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 05-12-2000, 01:09 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean