Crazy Eddies GUI System
0.7.0
|
CEGUI::Renderer implementation for the Ogre engine. More...
Public Member Functions | |
void | setRenderingEnabled (const bool enabled) |
set whether CEGUI rendering will occur | |
bool | isRenderingEnabled () const |
return whether CEGUI rendering is enabled. | |
Texture & | createTexture (Ogre::TexturePtr &tex, bool take_ownership=false) |
Create a CEGUI::Texture that wraps an existing Ogre texture. More... | |
RenderingRoot & | getDefaultRenderingRoot () |
Return the default rendering root for the renderer. The default rendering root is typically a RenderingRoot 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 () |
Create a 'null' Texture object. More... | |
Texture & | createTexture (const String &filename, const String &resourceGroup) |
Create a Texture object using the given image file. More... | |
Texture & | createTexture (const Size &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 | destroyAllTextures () |
Destroy all Texture objects created by this Renderer. | |
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. | |
void | setDisplaySize (const Size &sz) |
Set the size of the display or host window in pixels for this Renderer object. More... | |
const Size & | getDisplaySize () const |
Return the size of the display or host window in pixels. More... | |
const Vector2 & | 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... | |
Public Member Functions inherited from CEGUI::Renderer | |
virtual | ~Renderer () |
Destructor. | |
Static Public Member Functions | |
static OgreRenderer & | bootstrapSystem () |
Convenience function that creates all the Ogre specific objects and then initialises the CEGUI system with them. More... | |
static OgreRenderer & | bootstrapSystem (Ogre::RenderTarget &target) |
Convenience function that creates all the Ogre specific objects and then initialises the CEGUI system with them. More... | |
static void | destroySystem () |
Convenience function to cleanup the CEGUI system and related objects that were created by calling the bootstrapSystem function. More... | |
static OgreRenderer & | create () |
Create an OgreRenderer object that uses the default Ogre rendering window as the default output surface. More... | |
static OgreRenderer & | create (Ogre::RenderTarget &target) |
Create an OgreRenderer object that uses the specified Ogre::RenderTarget as the default output surface. | |
static void | destroy (OgreRenderer &renderer) |
destory an OgreRenderer object. | |
static OgreResourceProvider & | createOgreResourceProvider () |
function to create a CEGUI::OgreResourceProvider object | |
static void | destroyOgreResourceProvider (OgreResourceProvider &rp) |
function to destroy a CEGUI::OgreResourceProvider object | |
static OgreImageCodec & | createOgreImageCodec () |
function to create a CEGUI::OgreImageCodec object. | |
static void | destroyOgreImageCodec (OgreImageCodec &ic) |
function to destroy a CEGUI::OgreImageCodec object. | |
Protected Types | |
typedef std::vector < TextureTarget * > | TextureTargetList |
container type used to hold TextureTargets we create. | |
typedef std::vector < OgreGeometryBuffer * > | GeometryBufferList |
container type used to hold GeometryBuffers we create. | |
typedef std::vector < OgreTexture * > | TextureList |
container type used to hold Textures we create. | |
Protected Member Functions | |
OgreRenderer () | |
default constructor. | |
OgreRenderer (Ogre::RenderTarget &target) | |
constructor takin the Ogre::RenderTarget to use as the default root. | |
virtual | ~OgreRenderer () |
destructor. | |
void | checkOgreInitialised () |
checks Ogre initialisation. throws exceptions if an issue is detected. | |
void | constructor_impl (Ogre::RenderTarget &target) |
common parts of constructor | |
Protected Attributes | |
Size | d_displaySize |
What the renderer considers to be the current display size. | |
Vector2 | d_displayDPI |
What the renderer considers to be the current display DPI resolution. | |
RenderingRoot * | d_defaultRoot |
The default rendering root object. | |
RenderTarget * | d_defaultTarget |
The default RenderTarget (used by d_defaultRoot) | |
TextureTargetList | d_textureTargets |
Container used to track texture targets. | |
GeometryBufferList | d_geometryBuffers |
Container used to track geometry buffers. | |
TextureList | d_textures |
Container used to track textures. | |
uint | d_maxTextureSize |
What the renderer thinks the max texture size is. | |
Ogre::Root * | d_ogreRoot |
OGRE root object ptr. | |
Ogre::RenderSystem * | d_renderSystem |
Pointer to the render system for Ogre. | |
Static Protected Attributes | |
static String | d_rendererID |
String holding the renderer identification text. | |
CEGUI::Renderer implementation for the Ogre engine.
|
static |
Convenience function that creates all the Ogre specific objects and then initialises the CEGUI system with them.
The created Renderer will use the default Ogre rendering window as the default output surface. This will create and initialise the following objects for you: - CEGUI::OgreRenderer - CEGUI::OgreResourceProvider - CEGUI::OgreImageCodec - CEGUI::System
|
static |
Convenience function that creates all the Ogre specific objects and then initialises the CEGUI system with them.
The create Renderer will use the specified Ogre::RenderTarget as the default output surface. This will create and initialise the following objects for you: - CEGUI::OgreRenderer - CEGUI::OgreResourceProvider - CEGUI::OgreImageCodec - CEGUI::System
target | Reference to the Ogre::RenderTarget object that the created OgreRenderer will use as the default rendering root. |
|
static |
Create an OgreRenderer object that uses the default Ogre rendering window as the default output surface.
|
virtual |
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.
Implements CEGUI::Renderer.
Texture& CEGUI::OgreRenderer::createTexture | ( | Ogre::TexturePtr & | tex, |
bool | take_ownership = false |
||
) |
Create a CEGUI::Texture that wraps an existing Ogre texture.
tex | Ogre::TexturePtr for the texture that will be used by the created CEGUI::Texture. |
take_ownership |
|
virtual |
Create a 'null' Texture object.
Implements CEGUI::Renderer.
|
virtual |
Create a Texture object using the given image file.
filename | String object that specifies the path and filename of the image file to use when creating the texture. |
resourceGroup | String objet that specifies the resource group identifier to be passed to the resource provider when loading the texture file filename. |
Implements CEGUI::Renderer.
Create a Texture object with the given pixel dimensions as specified by size.
size | Size object that describes the desired texture size. |
Implements CEGUI::Renderer.
|
virtual |
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.
If the renderer is unable to offer such a thing, 0 should be returned.
Implements CEGUI::Renderer.
|
virtual |
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.
buffer | The GeometryBuffer object to be destroyed. |
Implements CEGUI::Renderer.
|
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::OgreImageCodec - CEGUI::OgreResourceProvider - CEGUI::OgreRenderer
|
virtual |
Destroy a Texture object that was previously created by calling the createTexture functions.
texture | Texture object to be destroyed. |
Implements CEGUI::Renderer.
|
virtual |
Function that cleans up TextureTarget objects created with the createTextureTarget function.
target | A pointer to a TextureTarget object that was previously returned from a call to createTextureTarget. |
Implements CEGUI::Renderer.
|
virtual |
Return the default rendering root for the renderer. The default rendering root is typically a RenderingRoot that targets the entire screen (or rendering window).
Implements CEGUI::Renderer.
|
virtual |
Return the resolution of the display or host window in dots per inch.
Implements CEGUI::Renderer.
|
virtual |
Return the size of the display or host window in pixels.
Implements CEGUI::Renderer.
|
virtual |
Return identification string for the renderer module.
Implements CEGUI::Renderer.
|
virtual |
Return the pixel size of the maximum supported texture.
Implements CEGUI::Renderer.
|
virtual |
Set the size of the display or host window in pixels for this Renderer object.
This is intended to be called by the System as part of the notification process when display size changes are notified to it via the System::notifyDisplaySizeChanged function.
size | Size object describing the dimesions of the current or host window in pixels. |
Implements CEGUI::Renderer.