Gateware Libraries  R6.5A
Beta Build
GW::GRAPHICS Namespace Reference

The namespace to which all Gateware Graphics library interfaces must belong. More...

Classes

class  GDirectX11Surface
 A library used to initialize, create, and manage a DirectX11 rendering context. More...
 
class  GOpenGLSurface
 A library used to initialize, create, and manage an OpenGL rendering context. More...
 

Enumerations

enum  GGraphicsInitOptions {
  COLOR_10_BIT = 0x01, DEPTH_BUFFER_SUPPORT = 0x02, DEPTH_STENCIL_SUPPORT = 0X04, OPENGL_ES_SUPPORT = 0x08,
  DIRECT2D_SUPPORT = 0x10
}
 GGraphicsInitOptions holds the special options that can be requested when initializing a GGraphics surface. More...
 

Functions

GATEWARE_EXPORT_IMPLICIT GReturn CreateGDirectX11Surface (SYSTEM::GWindow *_gWin, unsigned long long _initMask, GDirectX11Surface **_outSurface)
 Creates and outputs a new GDirectX11Surface object. More...
 
GATEWARE_EXPORT_IMPLICIT GReturn CreateGOpenGLSurface (SYSTEM::GWindow *_gWin, unsigned long long _initMask, GOpenGLSurface **_outSurface)
 Creates and outputs a new GOpenGLSurface object. More...
 

Detailed Description

The namespace to which all Gateware Graphics library interfaces must belong.

Enumeration Type Documentation

◆ GGraphicsInitOptions

GGraphicsInitOptions holds the special options that can be requested when initializing a GGraphics surface.

Enumerator
COLOR_10_BIT 

Require high dynamic range (HDR) color format

DEPTH_BUFFER_SUPPORT 

Require Z-Buffer support

DEPTH_STENCIL_SUPPORT 

Require Z-Buffer to contain an 8-bit stencil buffer

OPENGL_ES_SUPPORT 

Require OpenGL to support for mobile platforms

DIRECT2D_SUPPORT 

Require BGRA surface support for DirectX11

Function Documentation

◆ CreateGDirectX11Surface()

GATEWARE_EXPORT_IMPLICIT GReturn GW::GRAPHICS::CreateGDirectX11Surface ( SYSTEM::GWindow _gWin,
unsigned long long  _initMask,
GDirectX11Surface **  _outSurface 
)

Creates and outputs a new GDirectX11Surface object.

Initializes a handle to a GDirectX11Surface object with an existing GWindow. The created GDirectX11Surface object will have its reference count initialized to one and register as a listener to the provided GWindow object.

This function accepts a bit mask that can hold supported 'GGraphicsInitOptions', which will be taken into account when creating the context. To ignore this mask, simply pass in 0 when calling this function and the context will be created with default settings.

Parameters
[in]_gWinA pointer to an existing GWindow object.
[in]_initMaskThe bit mask that can hold special initialization options.
[out]_outSurfaceWill contain the GDirectX11Surface object if successfully created.
Return values
SUCCESSA GDirectX11Surface object was successfully created.
FAILUREA GDirectX11Surface object was not created. _outSurface will be null.
INVALID_ARGUMENTEither the _gWin, _outSurface or both arguments are nullptrs.

◆ CreateGOpenGLSurface()

GATEWARE_EXPORT_IMPLICIT GReturn GW::GRAPHICS::CreateGOpenGLSurface ( SYSTEM::GWindow _gWin,
unsigned long long  _initMask,
GOpenGLSurface **  _outSurface 
)

Creates and outputs a new GOpenGLSurface object.

Initializes a handle to a GOpenGLSurface object with an existing GWindow. The created GOpenGLSurface object will have its reference count initialized to one and register as a listener to the provided GWindow object.

This function accepts a bit mask that can hold supported 'GGraphicsInitOptions', which will be taken into account when creating the context. To ignore this mask, simply pass in 0 when calling this function and the context will be created with default settings.

Parameters
[in]_gWinA pointer to an existing GWindow object.
[in]_initMaskThe bit mask that can hold special initialization options.
[out]_outSurfaceWill contain the GOpenGLSurface object if successfully created.
Return values
SUCCESSA GOpenGLSurface object was successfully created.
FAILUREA GOpenGLSurface object was not created. _outSurface will be null.
INVALID_ARGUMENTEither the _gWin, _outSurface or both arguments are nullptrs.