Get available PixelFormat for a given DisplayMode

Started by pitt, January 18, 2006, 04:11:56

Previous topic - Next topic

pitt

How can I do it?

  Try to Display.create(for all possible PixelFormat); is not acceptable... :(

Thank you very much.

aldacron

Pixel formats are independent of display mode. The pixel format is the driver's internal representation of the framebuffer. There's nothing stopping the driver from using a pixel format with a color depth of 16 or 24 bits when the display mode has a depth of 32, for example. Passing the pixel format parameter is a way for you to tell the driver the minimum acceptable format for your application. It is not a way of specifying the format exactly, and you will often end up with an actual pixel format with values different from those you pass in.