This topic is now archived and is closed to further replies.


How does one....

Recommended Posts

Tristan10    122
create surfaces in directdraw7 with a pallete with only 2 colors in it? This would come in hand if I''d like my program to read in monochrome bitmaps, and store them in a memory efficient way. These bitmaps might be used for masking or whatever... The point is: I don''t get them to work...if I try to blit from these surfaces to my 8bit backbuffer, I get an DDERR_UNSUPPORTED. Any clues? Aren''t they supported? Source: // Describe this surface memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); ddsd.dwFlags = DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH | DDSD_PIXELFORMAT; ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; ddsd.dwHeight = bmp->InfoHeader.biHeight; ddsd.dwWidth = bmp->InfoHeader.biWidth; ddsd.ddpfPixelFormat.dwSize = sizeof(ddsd.ddpfPixelFormat); ddsd.ddpfPixelFormat.dwFlags = DDPF_RGB | DDPF_PALETTEINDEXED1; ddsd.ddpfPixelFormat.dwRGBBitCount = 1; Greets, Tristan

Share this post

Link to post
Share on other sites