Crazy Eddie's GUI System
0.8.2
|
Renderer class to interface with OpenGL. More...
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. More... | |
Public Member Functions inherited from CEGUI::OpenGLRendererBase | |
RenderTarget & | getDefaultRenderTarget () |
Returns the default RenderTarget object. The default render target is is typically one that targets the entire screen (or rendering window). More... | |
GeometryBuffer & | createGeometryBuffer () |
Create a new GeometryBuffer and return a reference to it. You should remove the GeometryBuffer from any RenderQueues and call destroyGeometryBuffer when you want to destroy the GeometryBuffer. More... | |
void | destroyGeometryBuffer (const GeometryBuffer &buffer) |
Destroy a GeometryBuffer that was returned when calling the createGeometryBuffer function. Before destroying any GeometryBuffer you should ensure that it has been removed from any RenderQueue that was using it. More... | |
void | destroyAllGeometryBuffers () |
Destroy all GeometryBuffer objects created by this Renderer. | |
TextureTarget * | createTextureTarget () |
Create a TextureTarget that can be used to cache imagery; this is a RenderTarget that does not lose it's content from one frame to another. More... | |
void | destroyTextureTarget (TextureTarget *target) |
Function that cleans up TextureTarget objects created with the createTextureTarget function. More... | |
void | destroyAllTextureTargets () |
Destory all TextureTarget objects created by this Renderer. | |
Texture & | createTexture (const String &name) |
Create a 'null' Texture object. More... | |
Texture & | createTexture (const String &name, const String &filename, const String &resourceGroup) |
Create a Texture object using the given image file. More... | |
Texture & | createTexture (const String &name, const Sizef &size) |
Create a Texture object with the given pixel dimensions as specified by size. More... | |
void | destroyTexture (Texture &texture) |
Destroy a Texture object that was previously created by calling the createTexture functions. More... | |
void | destroyTexture (const String &name) |
Destroy a Texture object that was previously created by calling the createTexture functions. More... | |
void | destroyAllTextures () |
Destroy all Texture objects created by this Renderer. | |
Texture & | getTexture (const String &name) const |
Return a Texture object that was previously created by calling the createTexture functions. More... | |
bool | isTextureDefined (const String &name) const |
Return whether a texture with the given name exists. | |
void | setDisplaySize (const Sizef &sz) |
Set the size of the display or host window in pixels for this Renderer object. More... | |
const Sizef & | getDisplaySize () const |
Return the size of the display or host window in pixels. More... | |
const Vector2f & | getDisplayDPI () const |
Return the resolution of the display or host window in dots per inch. More... | |
uint | getMaxTextureSize () const |
Return the pixel size of the maximum supported texture. More... | |
const String & | getIdentifierString () const |
Return identification string for the renderer module. More... | |
Texture & | createTexture (const String &name, GLuint tex, const Sizef &sz) |
Create a texture that uses an existing OpenGL texture with the specified size. Note that it is your responsibility to ensure that the OpenGL texture is valid and that the specified size is accurate. More... | |
void | enableExtraStateSettings (bool setting) |
Tells the renderer to initialise some extra states beyond what it directly needs itself for CEGUI. More... | |
void | grabTextures () |
Grabs all the loaded textures from Texture RAM and stores them in a local data buffer. This function invalidates all textures, and restoreTextures must be called before any CEGUI rendering is done for predictable results. | |
void | restoreTextures () |
Restores all the loaded textures from the local data buffers previously created by 'grabTextures'. | |
virtual Sizef | getAdjustedTextureSize (const Sizef &sz) const |
Helper to return a valid texture size according to reported OpenGL capabilities. More... | |
virtual const mat4Pimpl * | getViewProjectionMatrix () |
Helper to return view projection matrix. More... | |
const CEGUI::Rectf & | getActiveViewPort () |
Helper to get the viewport. More... | |
void | setActiveRenderTarget (RenderTarget *renderTarget) |
Helper to set the active render target. More... | |
RenderTarget * | getActiveRenderTarget () |
Helper to get the active render target. More... | |
Public Member Functions inherited from CEGUI::Renderer | |
virtual | ~Renderer () |
Destructor. | |
Static Public Member Functions | |
static OpenGLRenderer & | bootstrapSystem (const TextureTargetType tt_type=TTT_AUTO, const int abi=CEGUI_VERSION_ABI) |
Convenience function that creates the required objects to initialise the CEGUI system. More... | |
static OpenGLRenderer & | bootstrapSystem (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. More... | |
static void | destroySystem () |
Convenience function to cleanup the CEGUI system and related objects that were created by calling the bootstrapSystem function. More... | |
static OpenGLRenderer & | create (const TextureTargetType tt_type=TTT_AUTO, const int abi=CEGUI_VERSION_ABI) |
Create an OpenGLRenderer object. More... | |
static OpenGLRenderer & | create (const Sizef &display_size, const TextureTargetType tt_type=TTT_AUTO, const int abi=CEGUI_VERSION_ABI) |
Create an OpenGLRenderer object. More... | |
static void | destroy (OpenGLRenderer &renderer) |
Destroy an OpenGLRenderer object. More... | |
Static Public Member Functions inherited from CEGUI::OpenGLRendererBase | |
static float | getNextPOTSize (const float f) |
Utility function that will return f if it's a power of two, or the next power of two up from f if it's not. | |
Protected Member Functions | |
OpenGLGeometryBufferBase * | createGeometryBuffer_impl () |
return some appropriate OpenGLGeometryBufferBase subclass instance. | |
TextureTarget * | createTextureTarget_impl () |
return some appropriate TextureTarget subclass instance. | |
void | initialiseRendererIDString () |
set up renderer id string. | |
OpenGLRenderer (const TextureTargetType tt_type) | |
Constructor for OpenGL Renderer objects. More... | |
OpenGLRenderer (const Sizef &display_size, const TextureTargetType tt_type) | |
Constructor for OpenGL Renderer objects. More... | |
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 Member Functions inherited from CEGUI::OpenGLRendererBase | |
OpenGLRendererBase (const Sizef &display_size) | |
Constructor. More... | |
virtual | ~OpenGLRendererBase () |
Destructor! | |
void | initialiseMaxTextureSize () |
helper to set (rough) max texture size. | |
void | initialiseDisplaySizeWithViewportSize () |
helper to set display size with current viewport size. | |
Protected Attributes | |
OGLTextureTargetFactory * | d_textureTargetFactory |
pointer to a helper that creates TextureTargets supported by the system. | |
Protected Attributes inherited from CEGUI::OpenGLRendererBase | |
Sizef | d_displaySize |
What the renderer considers to be the current display size. | |
Vector2f | d_displayDPI |
What the renderer considers to be the current display DPI resolution. | |
RenderTarget * | d_defaultTarget |
The default RenderTarget. | |
TextureTargetList | d_textureTargets |
Container used to track texture targets. | |
GeometryBufferList | d_geometryBuffers |
Container used to track geometry buffers. | |
TextureMap | d_textures |
Container used to track textures. | |
uint | d_maxTextureSize |
What the renderer thinks the max texture size is. | |
bool | d_initExtraStates |
option of whether to initialise extra states that may not be at default | |
BlendMode | d_activeBlendMode |
What blend mode we think is active. | |
mat4Pimpl * | d_viewProjectionMatrix |
View projection matrix. | |
RenderTarget * | d_activeRenderTarget |
The active RenderTarget. | |
Additional Inherited Members | |
Protected Types inherited from CEGUI::OpenGLRendererBase | |
typedef std::vector < TextureTarget * > | TextureTargetList |
container type used to hold TextureTargets we create. | |
typedef std::vector < OpenGLGeometryBufferBase * > | GeometryBufferList |
container type used to hold GeometryBuffers created. | |
typedef std::map< String, OpenGLTexture *, StringFastLessCompare CEGUI_MAP_ALLOC(String, OpenGLTexture *)> | TextureMap |
container type used to hold Textures we create. | |
Static Protected Member Functions inherited from CEGUI::OpenGLRendererBase | |
static void | logTextureCreation (const String &name) |
helper to safely log the creation of a named texture | |
static void | logTextureDestruction (const String &name) |
helper to safely log the destruction of a named texture | |
Static Protected Attributes inherited from CEGUI::OpenGLRendererBase | |
static String | d_rendererID |
String holding the renderer identification text. | |
Renderer class to interface with OpenGL.
|
protected |
Constructor for OpenGL Renderer objects.
tt_type | Specifies one of the TextureTargetType enumerated values indicating the desired TextureTarget type to be used. |
|
protected |
Constructor for OpenGL Renderer objects.
display_size | Size object describing the initial display resolution. |
tt_type | Specifies one of the TextureTargetType enumerated values indicating the desired TextureTarget type to be used. |
|
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: - CEGUI::OpenGLRenderer - CEGUI::DefaultResourceProvider - CEGUI::System
tt_type | Specifies one of the TextureTargetType enumerated values indicating the desired TextureTarget type to be used. Defaults to TTT_AUTO. |
abi | This must be set to 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: - CEGUI::OpenGLRenderer - CEGUI::DefaultResourceProvider - CEGUI::System
display_size | Size object describing the initial display resolution. |
tt_type | Specifies one of the TextureTargetType enumerated values indicating the desired TextureTarget type to be used. Defaults to TTT_AUTO. |
abi | This must be set to CEGUI_VERSION_ABI |
|
static |
Create an OpenGLRenderer object.
tt_type | Specifies one of the TextureTargetType enumerated values indicating the desired TextureTarget type to be used. |
abi | This must be set to CEGUI_VERSION_ABI |
|
static |
Create an OpenGLRenderer object.
display_size | Size object describing the initial display resolution. |
tt_type | Specifies one of the TextureTargetType enumerated values indicating the desired TextureTarget type to be used. |
abi | This must be set to CEGUI_VERSION_ABI |
|
static |
Destroy an OpenGLRenderer object.
renderer | The OpenGLRenderer object to be destroyed. |
|
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: - CEGUI::System - CEGUI::DefaultResourceProvider - CEGUI::OpenGLRenderer
|
virtual |
Helper to set the view projection matrix.
viewProjectionMatrix | The view projection matrix. |
Reimplemented from CEGUI::OpenGLRendererBase.