Bitmap Textures

This is a discussion on Bitmap Textures within the Game Programming forums, part of the General Programming Boards category; Some Questions: 1.) When I use a bitmap file as a texture, it only works when I build and run ...

  1. #1
    People Love Me
    Join Date
    Jan 2003
    Posts
    412

    Question Bitmap Textures

    Some Questions:

    1.) When I use a bitmap file as a texture, it only works when I build and run the program within the compiler, but when I execute the program outside of the compiler, the program fails to load the .bmp file. Why is this so?

    2.)Why do bitmap texture file sizes hafta be multliples of 64?

  2. #2
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,859
    1. Look at the path you supply to load the bmp. Is it the full path?

    2. For DWORD alignment
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

  3. #3
    People Love Me
    Join Date
    Jan 2003
    Posts
    412
    Originally posted by novacain
    1. Look at the path you supply to load the bmp. Is it the full path?

    2. For DWORD alignment
    You need to supply the full path? I'll try it.

    (Teehee! Incredibly stupid mistake)

  4. #4
    Banned
    Join Date
    Jan 2003
    Posts
    1,708
    put the .bmp in the same folder as the executable as well as in the main folder which is where you have it right now.

  5. #5
    People Love Me
    Join Date
    Jan 2003
    Posts
    412
    Thanks, novacain. I got it working. The path is

    C:\Documents and Settings\Dean\My Documents\Graphics\thing.bmp

    But I had to change all the "\" characters to "/"


  6. #6
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640

    Re: Bitmap Textures

    Originally posted by Krak
    2.)Why do bitmap texture file sizes hafta be multliples of 64?
    they dont, they have to be powers of 2

  7. #7
    People Love Me
    Join Date
    Jan 2003
    Posts
    412
    Originally posted by Perspective
    they dont, they have to be powers of 2
    such as 2, 4, 8, 16, 32, 64, 128, 256, etc.? Okay...but why?

    Another question:

    Why do they hafta be bitmap files?

  8. #8
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    Originally posted by Krak
    such as 2, 4, 8, 16, 32, 64, 128, 256, etc.? Okay...but why?
    as novacain pointed out above, for alignment. you can get around this by using mipmaps (i think, never actually tried)

    Originally posted by Krak

    Another question:

    Why do they hafta be bitmap files?
    they dont. you can use many different image types for textures as long as you are familiar with their format and can write a proper loader (or find a good tutorial)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Loading a bitmap (Without using glaux)
    By Shamino in forum Game Programming
    Replies: 7
    Last Post: 03-16-2006, 09:43 AM
  2. OpenGL -- Bitmaps
    By HQSneaker in forum Game Programming
    Replies: 14
    Last Post: 09-06-2004, 05:04 PM
  3. the effects of textures on my frame rate
    By DavidP in forum Game Programming
    Replies: 37
    Last Post: 10-03-2003, 12:24 PM
  4. Idiot's Guide To Bitmap Textures?
    By Krak in forum Game Programming
    Replies: 9
    Last Post: 07-19-2003, 10:46 AM
  5. bitmap not going onto screen
    By stallion in forum Windows Programming
    Replies: 4
    Last Post: 02-22-2003, 10:07 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21