Those crazy pixel formats

Started by
4 comments, last by Zole 22 years, 8 months ago
I''m trying to do some 2D graphics with Direct3D 8, and I''m getting a little tripped up by the concept of enumerating video modes and selecting an available mode to do rendering. For example, I made a small app and gave it to a friend with a Voodoo3 to test; but it wouldn''t work because it took the pixel format from the current desktop mode, which was 32bpp, which the Voodoo3 won''t do in 3D mode. So does anyone have any tips or on this matter, or where I can find some?
Advertisement
Download my D3DXSprite wrapper and hack out the D3D init routine.. it searches for the closest match if 32Bit isnt supported. Click below:

  Downloads:  ZeroOne Realm

  Downloads:  ZeroOne Realm

You want crazy?

The Apple II could display 8 colors: black, white, orange, green, magenta and blue. But you could only have orange every other pixel, and green inbetween. But if you had orange and green on next to each other, you got white instead. The same worked for blue and magenta.

And then there was the Amiga''s HAM mode: Hold and Modify. Don''t even get me started.

_______________________________
"To understand the horse you'll find that you're going to be working on yourself. The horse will give you the answers and he will question you to see if you are sure or not."
- Ray Hunt, in Think Harmony With Horses
ALU - SHRDLU - WORDNET - CYC - SWALE - AM - CD - J.M. - K.S. | CAA - BCHA - AQHA - APHA - R.H. - T.D. | 395 - SPS - GORDIE - SCMA - R.M. - G.R. - V.C. - C.F.
Well, that''s just it, there are too many options. I''m sure one didn''t have to worry about event handling or enumerating available display modes (probably "Two" on the Apple, right?). I never worked with Apple II or Amiga but I remember the IBM CGA well: 4 colors, two of which were black and white, the other two magenta and cyan - probably not a lot of artists on that IBM team. Personally I had an MCGA, which was the same but with one low-res 256-color mode but no high-res 16-color modes like the VGA
Well, that''s just it, there are too many options. I''m sure one didn''t have to worry about event handling or enumerating available display modes (probably "Two" on the Apple, right?). I never worked with Apple II or Amiga but I remember the IBM CGA well: 4 colors, two of which were black and white, the other two magenta and cyan - probably not a lot of artists on that IBM team. Personally I had an MCGA, which was the same but with one low-res 256-color mode but no high-res 16-color modes like the VGA
Enumerating display modes in dx8 is a piece of piss compared with earlier versions. The best thing to do would be to default the app to a mode which you can garantee is available (800x600x16 or 640x480x16 are pretty much universally supported - although you might still have to check for 555/565 modes) and then let the user set different modes using an in game menu option (or go the diablo/baldurs gate route and force a certain resolution, but allow the user to change the bit depth)

Trust me, the pain of supporting a few extra modes is far less than the pain of having only 4 colours to work with, so all your art looks like someone puked all over your monitor

Edited by - Sandman on July 24, 2001 9:49:14 AM

This topic is closed to new replies.

Advertisement