palette problem

This is a discussion on palette problem within the Windows Programming forums, part of the Platform Specific Boards category; Hi guys: When displaying the 8-bit bitmaps on the screen in DirectX, we have to set the palette to the ...

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    173

    Unhappy palette problem

    Hi guys:
    When displaying the 8-bit bitmaps on the screen in DirectX,
    we have to set the palette to the LPDIRECTDRAWPALETTE interface, the palette's value is from the bitmap.
    Well, yes, it works if only shows one bitmap, but if there are two or more bitmaps, I don't know which bitmap palette should be attached to the primary surface.
    I've tried to choose one of the bitmap's palette, the other one was nice shown without any color distortion, but sometimes not.

    Thanx,I hope to make my question clear

  2. #2
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    1) Save both bitmaps with the same palette
    2) Use 16bit colours
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  3. #3
    Registered User
    Join Date
    Sep 2001
    Posts
    173
    yes, I think each 8-bit bitmap has it's own palette, how can I save them within same palette?option 2 is a quite nice answer too
    Don't laugh at me,I am just a SuperNewbie.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help understanding a problem
    By dnguyen1022 in forum C++ Programming
    Replies: 2
    Last Post: 04-29-2009, 05:21 PM
  2. Memory problem with Borland C 3.1
    By AZ1699 in forum C Programming
    Replies: 16
    Last Post: 11-16-2007, 11:22 AM
  3. Someone having same problem with Code Block?
    By ofayto in forum C++ Programming
    Replies: 1
    Last Post: 07-12-2007, 09:38 AM
  4. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 03:51 PM
  5. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 07:54 PM

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