Crazy Eddie's GUI System  0.8.4
CEGUI::OpenGLRenderer Class Reference

Renderer class to interface with OpenGL. More...

+ Inheritance diagram for CEGUI::OpenGLRenderer:
+ Collaboration diagram for CEGUI::OpenGLRenderer:

List of all members.

Public Types

enum  TextureTargetType { TTT_AUTO, TTT_FBO, TTT_PBUFFER, TTT_NONE }
 Enumeration of valid texture target types. More...

Public Member Functions

void beginRendering ()
 Perform any operations required to put the system into a state ready for rendering operations to begin.
void endRendering ()
 Perform any operations required to finalise rendering.
bool isS3TCSupported () const
 Return whether EXT_texture_compression_s3tc is supported.
void setupRenderingBlendMode (const BlendMode mode, const bool force=false)
 set the render states for the specified BlendMode.
void setViewProjectionMatrix (const mat4Pimpl *viewProjectionMatrix)
 Helper to set the view projection matrix.

Static Public Member Functions

static OpenGLRendererbootstrapSystem (const TextureTargetType tt_type=TTT_AUTO, const int abi=CEGUI_VERSION_ABI)
 Convenience function that creates the required objects to initialise the CEGUI system.
static OpenGLRendererbootstrapSystem (const Sizef &display_size, const TextureTargetType tt_type=TTT_AUTO, const int abi=CEGUI_VERSION_ABI)
 Convenience function that creates the required objects to initialise the CEGUI system.
static void destroySystem ()
 Convenience function to cleanup the CEGUI system and related objects that were created by calling the bootstrapSystem function.
static OpenGLRenderercreate (const TextureTargetType tt_type=TTT_AUTO, const int abi=CEGUI_VERSION_ABI)
 Create an OpenGLRenderer object.
static OpenGLRenderercreate (const Sizef &display_size, const TextureTargetType tt_type=TTT_AUTO, const int abi=CEGUI_VERSION_ABI)
 Create an OpenGLRenderer object.
static void destroy (OpenGLRenderer &renderer)
 Destroy an OpenGLRenderer object.

Protected Member Functions

OpenGLGeometryBufferBasecreateGeometryBuffer_impl ()
 return some appropriate OpenGLGeometryBufferBase subclass instance.
TextureTargetcreateTextureTarget_impl ()
 return some appropriate TextureTarget subclass instance.
void initialiseRendererIDString ()
 set up renderer id string.
 OpenGLRenderer (const TextureTargetType tt_type)
 Constructor for OpenGL Renderer objects.
 OpenGLRenderer (const Sizef &display_size, const TextureTargetType tt_type)
 Constructor for OpenGL Renderer objects.
virtual ~OpenGLRenderer ()
 Destructor for OpenGLRenderer objects.
void setupExtraStates ()
 init the extra GL states enabled via enableExtraStateSettings
void cleanupExtraStates ()
 cleanup the extra GL states enabled via enableExtraStateSettings
void initialiseTextureTargetFactory (const TextureTargetType tt_type)
 initialise OGLTextureTargetFactory that will generate TextureTargets
void initialiseGLExtensions ()

Protected Attributes

OGLTextureTargetFactoryd_textureTargetFactory
 pointer to a helper that creates TextureTargets supported by the system.

Detailed Description

Renderer class to interface with OpenGL.


Member Enumeration Documentation

Enumeration of valid texture target types.

Enumerator:
TTT_AUTO 

Automatically choose the best type available.

TTT_FBO 

Use targets based on frame buffer objects if available, else none.

TTT_PBUFFER 

Use targets based on pbuffer support if available, else none.

TTT_NONE 

Disable texture targets.


Constructor & Destructor Documentation

Constructor for OpenGL Renderer objects.

Parameters:
tt_typeSpecifies one of the TextureTargetType enumerated values indicating the desired TextureTarget type to be used.
CEGUI::OpenGLRenderer::OpenGLRenderer ( const Sizef display_size,
const TextureTargetType  tt_type 
) [protected]

Constructor for OpenGL Renderer objects.

Parameters:
display_sizeSize object describing the initial display resolution.
tt_typeSpecifies one of the TextureTargetType enumerated values indicating the desired TextureTarget type to be used.

Member Function Documentation

static OpenGLRenderer& CEGUI::OpenGLRenderer::bootstrapSystem ( const TextureTargetType  tt_type = TTT_AUTO,
const int  abi = CEGUI_VERSION_ABI 
) [static]

Convenience function that creates the required objects to initialise the CEGUI system.

The created Renderer will use the current OpenGL viewport as it's default surface size.

This will create and initialise the following objects for you:

Parameters:
tt_typeSpecifies one of the TextureTargetType enumerated values indicating the desired TextureTarget type to be used. Defaults to TTT_AUTO.
abiThis must be set to CEGUI_VERSION_ABI
Returns:
Reference to the CEGUI::OpenGLRenderer object that was created.
static OpenGLRenderer& CEGUI::OpenGLRenderer::bootstrapSystem ( const Sizef display_size,
const TextureTargetType  tt_type = TTT_AUTO,
const int  abi = CEGUI_VERSION_ABI 
) [static]

Convenience function that creates the required objects to initialise the CEGUI system.

The created Renderer will use the current OpenGL viewport as it's default surface size.

This will create and initialise the following objects for you:

Parameters:
display_sizeSize object describing the initial display resolution.
tt_typeSpecifies one of the TextureTargetType enumerated values indicating the desired TextureTarget type to be used. Defaults to TTT_AUTO.
abiThis must be set to CEGUI_VERSION_ABI
Returns:
Reference to the CEGUI::OpenGLRenderer object that was created.
static OpenGLRenderer& CEGUI::OpenGLRenderer::create ( const TextureTargetType  tt_type = TTT_AUTO,
const int  abi = CEGUI_VERSION_ABI 
) [static]

Create an OpenGLRenderer object.

Parameters:
tt_typeSpecifies one of the TextureTargetType enumerated values indicating the desired TextureTarget type to be used.
abiThis must be set to CEGUI_VERSION_ABI
static OpenGLRenderer& CEGUI::OpenGLRenderer::create ( const Sizef display_size,
const TextureTargetType  tt_type = TTT_AUTO,
const int  abi = CEGUI_VERSION_ABI 
) [static]

Create an OpenGLRenderer object.

Parameters:
display_sizeSize object describing the initial display resolution.
tt_typeSpecifies one of the TextureTargetType enumerated values indicating the desired TextureTarget type to be used.
abiThis must be set to CEGUI_VERSION_ABI
static void CEGUI::OpenGLRenderer::destroy ( OpenGLRenderer renderer) [static]

Destroy an OpenGLRenderer object.

Parameters:
rendererThe OpenGLRenderer object to be destroyed.
static void CEGUI::OpenGLRenderer::destroySystem ( ) [static]

Convenience function to cleanup the CEGUI system and related objects that were created by calling the bootstrapSystem function.

This function will destroy the following objects for you:

Note:
If you did not initialise CEGUI by calling the bootstrapSystem function, you should not call this, but rather delete any objects you created manually.
void CEGUI::OpenGLRenderer::setViewProjectionMatrix ( const mat4Pimpl viewProjectionMatrix) [virtual]

Helper to set the view projection matrix.

Parameters:
viewProjectionMatrixThe view projection matrix.

Reimplemented from CEGUI::OpenGLRendererBase.

 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends