GfxModeDepth ( mode )
Parameters
| mode - graphics mode index, from 1 to CountGfxModes() |
Description
|
Returns the colour depth, in bits, of a fullscreen graphics mode. Completes the trio with GfxModeWidth and GfxModeHeight when walking the mode list from CountGfxModes. On the modern runtime every listed mode is 32-bit, so expect 32 across the board - the command remains for classic code that grouped modes by depth. An index outside 1 to CountGfxModes() raises a runtime error in debug mode. See also: CountGfxModes, GfxModeWidth, GfxModeHeight, GraphicsDepth. |
Example
; GFXModeDepth Example ; -------------------- ; Ask the video card how many display modes it offers modes=CountGfxModes() Print "Your video card offers "+modes+" display modes." Print "" ; GFXModeDepth gives the colour depth in bits of each numbered mode limit=modes If limit>15 Then limit=15 For t=1 To limit Print "Mode "+t+": "+GfxModeWidth(t)+" x "+GfxModeHeight(t)+" x "+GFXModeDepth(t)+" bit" Next If modes>limit Then Print "... and "+(modes-limit)+" more." Print "" Print "Press any key to close the example" WaitKey End
Index