GfxModeFormat ( mode )

Parameters

mode - a valid integer value, existing within the range 1 - CountGfxModes()

Description

Returns the pixel format of a particular graphics mode, represented by a 'mode' value. The mode value corresponds to a particular screen setting (such as 800x600x16) available with the host machine's selected graphics card.

The mode value will exist within the range 1 - CountGfxModes(), with CountGfxModes() returning the total nuber of graphics modes available with the selected graphics card. By using a for loop with CountGfxModes(), as shown in the example below, you can quickly find out all possible GfxModeFormat values for all graphics modes.

The return value can be one of the following:

1 - 16 bit RGB format with 5 bits red, 6 bits green and 5 bits blue.
2 - 16 bit RGB format with 5 bits red, 5 bits green and 5 bits blue. The high bit is unused.
3 - 24 bit RGB format.
4 - 32 bit RGB format. The high byte is unused.

See also: CountGfxModes, GraphicsFormat, LockedFormat, Graphics.

Example

For i=1 To CountGfxModes()

Print "GfxMode: "+i+" Format: "+GfxModeFormat(i)

Next

Repeat
Forever

Index

Click here to view the latest version of this page online