Skip to content

GfxModeExists

Narta Xaymar Dirks edited this page Oct 28, 2026 · 8 revisions

Blitz3DBlitzPlusBlitzBasic

GfxModeExists

GfxModeExists:Int32 width:Int32, height:Int32, depth:Int32
Parameter Mode Type Default Description
width In Int32 required The width, or 0 for any width.
height In Int32 required The height, or 0 for any height.
depth In Int32 required The color depth in bits, which is not looked at, because every mode has 32 bits.

Returns: 1 if a mode like that exists, otherwise 0.

Description

Tells whether the display has a mode of this size and color depth, so that a program can ask before it opens that mode.

Differences

  • A 0 for the width or height means "anything fits", like in BlitzPlus. A window of any size can be opened here whether or not it is in the list: the list only has the modes for full screen.

Examples

If GfxModeExists(800, 600, 32) Then
	Print "800x600 is available"
Else
	Print "800x600 is not available"
EndIf
If GfxModeExists(0, 0, 32) Then Print "There is at least one 32 bit mode"
WaitKey

Related Commands

CountGfxDrivers, CountGfxModes, GfxDriver 〔BlitzLLVM〕, GfxDriverName, GfxModeDepth, GfxModeFormat, GfxModeHeight, GfxModeWidth

Home · Command Index



Differences
Language Features
BlitzBasic
Blitz3D
BlitzPlus

Clone this wiki locally