Previous: 4.51.2.2.3. ogCopyPal() To the Table of Contents Next: 4.51.2.2.5. ogDone()
4.51.2.2.3. ogCopyPal() Table of Contents 4.51.2.2.5. ogDone()

- 4.51.2.2.4. -
Table of Contents
4. Standard Units
4.51. ObjGfx40 - ObjectGraphics 4.0 Unit
4.51.2. ObjGfx40 Unit Object Types
4.51.2.2. ogDisplay object
4.51.2.2.4. ogCreate()


4.51.2.2.4. ogCreate()

Targets: MS-DOS, Win32 console


ObjGfx40 Unit

Sets the display mode.

Declaration:
  function ogCreate(xRes, yRes: uInt32; pixFormat:ogPixelFmt):boolean; virtual;
Remarks:

This method will search through the list of available modes and choose one that best fits the requested resolution and pixel format. Only the bitdepth of the pixel format is used.

For 24/32BPP screen modes, ogCreate() will attempt to select the requested bit-depth. In the event that the card does not support that bit-depth, it will attempt to find another true-colour bitdepth that is supported. A screen mode that is >= to the requested resolution will be initialized. For example, attempting to set 512x384 when that mode isn't available will init 640x400 (provided 640x400 is available). When working with unstandard resolutions, one should check to see what resolution was actually set.

Return value:

Returns TRUE if successful, FALSE if failure. Extended error information is available through ogGetLastError()

See also:


Previous: 4.51.2.2.3. ogCopyPal() To the Table of Contents Next: 4.51.2.2.5. ogDone()
4.51.2.2.3. ogCopyPal() Table of Contents 4.51.2.2.5. ogDone()

- 4.51.2.2.4. -