Thread: TGA file loader...error reading

  1. #16
    carry on JaWiB's Avatar
    Join Date
    Feb 2003
    Location
    Seattle, WA
    Posts
    1,972
    Before I read your post, I was pretty sure that it was not RGBA, but I checked anyway, and what I know for sure is it is **GB, and I can only assume that ** is AR, but I don't display Alpha and red won't come out (still no luck). I tested it like this:

    Code:
    #define __RGB32BIT(a,r,g,b)  ( (0)<<24 | (0)<<16 | (0)<<8 | (b) )
    //and later:
    #define __RGB32BIT(a,r,g,b)  ( (0)<<24 | (0)<<16 | (g)<<8 | (b) )
    Where I passed 255,255, and 255 for RGB, the preceding code displayed blue and green, respectively. When I tested it that way for red I got a black screen...

    EDIT!!

    I don't believe it...I was storing the surface information in an array of USHORT(s) So it couldn't hold all the data! (Slaps self)
    Last edited by JaWiB; 10-14-2003 at 06:29 PM.
    "Think not but that I know these things; or think
    I know them not: not therefore am I short
    Of knowing what I ought."
    -John Milton, Paradise Regained (1671)

    "Work hard and it might happen."
    -XSquared

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Formatting a text file...
    By dagorsul in forum C Programming
    Replies: 12
    Last Post: 05-02-2008, 03:53 AM
  2. multiple file loading. so fruturated! help!
    By psychopath in forum Game Programming
    Replies: 5
    Last Post: 05-09-2005, 05:13 PM
  3. archive format
    By Nor in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 08-05-2003, 07:01 PM
  4. Making a LIB file from a DEF file for a DLL
    By JMPACS in forum C++ Programming
    Replies: 0
    Last Post: 08-02-2003, 08:19 PM
  5. Hmm....help me take a look at this: File Encryptor
    By heljy in forum C Programming
    Replies: 3
    Last Post: 03-23-2002, 10:57 AM