Top Description Fields Constructors Methods
org.lwjgl.util

public final Class Display

extends Object
Class Inheritance
Imports
java.util.ArrayList, .Arrays, .Comparator, org.lwjgl.LWJGLException, .LWJGLUtil, org.lwjgl.opengl.DisplayMode

Display initialization utility, that can be used to find display modes and pick one for you based on your criteria.
Author
$Author$
Version
$Revision$ $Id$

Field Summary

Modifier and TypeField and Description
private static final boolean

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static DisplayMode[]

Returns:

an array of matching display modes
getAvailableDisplayModes
(int
the minimum display resolution in pixels
minWidth
,
int
the minimum display resolution in pixels
minHeight
,
int
the maximum display resolution in pixels
maxWidth
,
int
the maximum display resolution in pixels
maxHeight
,
int
the minimum bit depth per pixel
minBPP
,
int
the maximum bit depth per pixel
maxBPP
,
int
the minimum display frequency in Hz
minFreq
,
int
the maximum display frequency in Hz
maxFreq
)

Determine the available display modes that match the specified minimum and maximum criteria.

public static DisplayMode

Returns:

the chosen display mode
setDisplayMode
(DisplayMode[]
a list of display modes to choose from
dm
,
final String[]
the names of the DisplayMode fields in the order in which you would like them sorted.
param
)

Create the display by choosing from a list of display modes based on an order of preference.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DEBUGback to summary
private static final boolean DEBUG

Constructor Detail

Displayback to summary
public Display()

Method Detail

getAvailableDisplayModesback to summary
public static DisplayMode[] getAvailableDisplayModes(int minWidth, int minHeight, int maxWidth, int maxHeight, int minBPP, int maxBPP, int minFreq, int maxFreq) throws LWJGLException

Determine the available display modes that match the specified minimum and maximum criteria. If any given criterium is specified as -1 then it is ignored.

Parameters
minWidth:int

the minimum display resolution in pixels

minHeight:int

the minimum display resolution in pixels

maxWidth:int

the maximum display resolution in pixels

maxHeight:int

the maximum display resolution in pixels

minBPP:int

the minimum bit depth per pixel

maxBPP:int

the maximum bit depth per pixel

minFreq:int

the minimum display frequency in Hz

maxFreq:int

the maximum display frequency in Hz

Returns:DisplayMode[]

an array of matching display modes

setDisplayModeback to summary
public static DisplayMode setDisplayMode(DisplayMode[] dm, final String[] param) throws Exception

Create the display by choosing from a list of display modes based on an order of preference. You must supply a list of allowable display modes, probably by calling getAvailableDisplayModes(), and an array with the order in which you would like them sorted in descending order. This method attempts to create the topmost display mode; if that fails, it will try the next one, and so on, until there are no modes left. If no mode is set at the end, an exception is thrown.

Parameters
dm:DisplayMode[]

a list of display modes to choose from

param:String[]

the names of the DisplayMode fields in the order in which you would like them sorted.

Returns:DisplayMode

the chosen display mode

Exceptions
Exception:
if no display mode could be set
NoSuchFieldException:
if one of the params is not a field in DisplayMode
See Also
org.lwjgl.opengl.DisplayMode