Crazy Eddie's GUI System  0.8.4
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
CEGUI::Renderer Class Referenceabstract

Abstract class defining the basic required interface for Renderer objects. More...

Inherits CEGUI::AllocatedObject< Renderer >.

Inherited by CEGUI::Direct3D10Renderer, CEGUI::Direct3D11Renderer, CEGUI::Direct3D9Renderer, CEGUI::DirectFBRenderer, CEGUI::IrrlichtRenderer, CEGUI::NullRenderer, CEGUI::OgreRenderer, CEGUI::OpenGLESRenderer, and CEGUI::OpenGLRendererBase.

+ Collaboration diagram for CEGUI::Renderer:

Public Member Functions

virtual RenderTargetgetDefaultRenderTarget ()=0
 Returns the default RenderTarget object. The default render target is is typically one that targets the entire screen (or rendering window). More...
 
virtual GeometryBuffercreateGeometryBuffer ()=0
 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...
 
virtual void destroyGeometryBuffer (const GeometryBuffer &buffer)=0
 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...
 
virtual void destroyAllGeometryBuffers ()=0
 Destroy all GeometryBuffer objects created by this Renderer.
 
virtual TextureTargetcreateTextureTarget ()=0
 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...
 
virtual void destroyTextureTarget (TextureTarget *target)=0
 Function that cleans up TextureTarget objects created with the createTextureTarget function. More...
 
virtual void destroyAllTextureTargets ()=0
 Destory all TextureTarget objects created by this Renderer.
 
virtual TexturecreateTexture (const String &name)=0
 Create a 'null' Texture object. More...
 
virtual TexturecreateTexture (const String &name, const String &filename, const String &resourceGroup)=0
 Create a Texture object using the given image file. More...
 
virtual TexturecreateTexture (const String &name, const Sizef &size)=0
 Create a Texture object with the given pixel dimensions as specified by size. More...
 
virtual void destroyTexture (Texture &texture)=0
 Destroy a Texture object that was previously created by calling the createTexture functions. More...
 
virtual void destroyTexture (const String &name)=0
 Destroy a Texture object that was previously created by calling the createTexture functions. More...
 
virtual void destroyAllTextures ()=0
 Destroy all Texture objects created by this Renderer.
 
virtual TexturegetTexture (const String &name) const =0
 Return a Texture object that was previously created by calling the createTexture functions. More...
 
virtual bool isTextureDefined (const String &name) const =0
 Return whether a texture with the given name exists.
 
virtual void beginRendering ()=0
 Perform any operations required to put the system into a state ready for rendering operations to begin.
 
virtual void endRendering ()=0
 Perform any operations required to finalise rendering.
 
virtual void setDisplaySize (const Sizef &size)=0
 Set the size of the display or host window in pixels for this Renderer object. More...
 
virtual const SizefgetDisplaySize () const =0
 Return the size of the display or host window in pixels. More...
 
virtual const Vector2fgetDisplayDPI () const =0
 Return the resolution of the display or host window in dots per inch. More...
 
virtual uint getMaxTextureSize () const =0
 Return the pixel size of the maximum supported texture. More...
 
virtual const StringgetIdentifierString () const =0
 Return identification string for the renderer module. More...
 
virtual ~Renderer ()
 Destructor.
 

Detailed Description

Abstract class defining the basic required interface for Renderer objects.

Objects derived from Renderer are the means by which the GUI system interfaces with specific rendering technologies. To use a rendering system or API to draw CEGUI imagery requires that an appropriate Renderer object be available.

Member Function Documentation

virtual GeometryBuffer& CEGUI::Renderer::createGeometryBuffer ( )
pure 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.

Returns
GeometryBuffer object.

Implemented in CEGUI::OgreRenderer, CEGUI::OpenGLESRenderer, CEGUI::Direct3D11Renderer, CEGUI::IrrlichtRenderer, CEGUI::Direct3D9Renderer, CEGUI::Direct3D10Renderer, CEGUI::NullRenderer, CEGUI::OpenGLRendererBase, and CEGUI::DirectFBRenderer.

virtual Texture& CEGUI::Renderer::createTexture ( const String name)
pure virtual

Create a 'null' Texture object.

Parameters
nameString holding the name for the new texture. Texture names must be unique within the Renderer.
Returns
A newly created Texture object. The returned Texture object has no size or imagery associated with it.

Implemented in CEGUI::OgreRenderer, CEGUI::OpenGLESRenderer, CEGUI::Direct3D11Renderer, CEGUI::IrrlichtRenderer, CEGUI::Direct3D9Renderer, CEGUI::Direct3D10Renderer, CEGUI::NullRenderer, CEGUI::OpenGLRendererBase, and CEGUI::DirectFBRenderer.

virtual Texture& CEGUI::Renderer::createTexture ( const String name,
const String filename,
const String resourceGroup 
)
pure virtual

Create a Texture object using the given image file.

Parameters
nameString holding the name for the new texture. Texture names must be unique within the Renderer.
filenameString object that specifies the path and filename of the image file to use when creating the texture.
resourceGroupString objet that specifies the resource group identifier to be passed to the resource provider when loading the texture file filename.
Returns
A newly created Texture object. The initial content of the texture memory is the requested image file.
Note
Due to possible limitations of the underlying hardware, API or engine, the final size of the texture may not match the size of the loaded file. You can check the ultimate sizes by querying the Texture object after creation.

Implemented in CEGUI::OgreRenderer, CEGUI::OpenGLESRenderer, CEGUI::Direct3D11Renderer, CEGUI::IrrlichtRenderer, CEGUI::Direct3D9Renderer, CEGUI::Direct3D10Renderer, CEGUI::NullRenderer, CEGUI::OpenGLRendererBase, and CEGUI::DirectFBRenderer.

virtual Texture& CEGUI::Renderer::createTexture ( const String name,
const Sizef size 
)
pure virtual

Create a Texture object with the given pixel dimensions as specified by size.

Parameters
nameString holding the name for the new texture. Texture names must be unique within the Renderer.
sizeSize object that describes the desired texture size.
Returns
A newly created Texture object. The initial contents of the texture memory is undefined.
Note
Due to possible limitations of the underlying hardware, API or engine, the final size of the texture may not match the requested size. You can check the ultimate sizes by querying the Texture object after creation.

Implemented in CEGUI::OgreRenderer, CEGUI::OpenGLESRenderer, CEGUI::Direct3D11Renderer, CEGUI::IrrlichtRenderer, CEGUI::Direct3D9Renderer, CEGUI::Direct3D10Renderer, CEGUI::NullRenderer, CEGUI::OpenGLRendererBase, and CEGUI::DirectFBRenderer.

virtual TextureTarget* CEGUI::Renderer::createTextureTarget ( )
pure 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.
Returns
Pointer to a TextureTarget object that is suitable for caching imagery, or 0 if the renderer is unable to offer such a thing.

Implemented in CEGUI::OgreRenderer, CEGUI::OpenGLESRenderer, CEGUI::Direct3D11Renderer, CEGUI::IrrlichtRenderer, CEGUI::Direct3D9Renderer, CEGUI::Direct3D10Renderer, CEGUI::NullRenderer, CEGUI::OpenGLRendererBase, and CEGUI::DirectFBRenderer.

virtual void CEGUI::Renderer::destroyGeometryBuffer ( const GeometryBuffer buffer)
pure 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.

Parameters
bufferThe GeometryBuffer object to be destroyed.

Implemented in CEGUI::OgreRenderer, CEGUI::OpenGLESRenderer, CEGUI::Direct3D11Renderer, CEGUI::IrrlichtRenderer, CEGUI::Direct3D9Renderer, CEGUI::Direct3D10Renderer, CEGUI::NullRenderer, CEGUI::OpenGLRendererBase, and CEGUI::DirectFBRenderer.

virtual void CEGUI::Renderer::destroyTexture ( Texture texture)
pure virtual

Destroy a Texture object that was previously created by calling the createTexture functions.

Parameters
textureTexture object to be destroyed.

Implemented in CEGUI::OgreRenderer, CEGUI::OpenGLESRenderer, CEGUI::Direct3D11Renderer, CEGUI::IrrlichtRenderer, CEGUI::Direct3D9Renderer, CEGUI::Direct3D10Renderer, CEGUI::NullRenderer, CEGUI::OpenGLRendererBase, and CEGUI::DirectFBRenderer.

virtual void CEGUI::Renderer::destroyTexture ( const String name)
pure virtual

Destroy a Texture object that was previously created by calling the createTexture functions.

Parameters
nameString holding the name of the texture to destroy.

Implemented in CEGUI::OgreRenderer, CEGUI::OpenGLESRenderer, CEGUI::Direct3D11Renderer, CEGUI::IrrlichtRenderer, CEGUI::Direct3D9Renderer, CEGUI::Direct3D10Renderer, CEGUI::NullRenderer, CEGUI::OpenGLRendererBase, and CEGUI::DirectFBRenderer.

virtual void CEGUI::Renderer::destroyTextureTarget ( TextureTarget target)
pure virtual

Function that cleans up TextureTarget objects created with the createTextureTarget function.

Parameters
targetA pointer to a TextureTarget object that was previously returned from a call to createTextureTarget.

Implemented in CEGUI::OgreRenderer, CEGUI::OpenGLESRenderer, CEGUI::Direct3D11Renderer, CEGUI::IrrlichtRenderer, CEGUI::Direct3D9Renderer, CEGUI::Direct3D10Renderer, CEGUI::NullRenderer, CEGUI::OpenGLRendererBase, and CEGUI::DirectFBRenderer.

virtual RenderTarget& CEGUI::Renderer::getDefaultRenderTarget ( )
pure virtual

Returns the default RenderTarget object. The default render target is is typically one that targets the entire screen (or rendering window).

Returns
Reference to a RenderTarget object.

Implemented in CEGUI::OgreRenderer, CEGUI::OpenGLESRenderer, CEGUI::Direct3D11Renderer, CEGUI::IrrlichtRenderer, CEGUI::Direct3D9Renderer, CEGUI::Direct3D10Renderer, CEGUI::NullRenderer, CEGUI::OpenGLRendererBase, and CEGUI::DirectFBRenderer.

virtual const Vector2f& CEGUI::Renderer::getDisplayDPI ( ) const
pure virtual

Return the resolution of the display or host window in dots per inch.

Returns
Vector2 object that describes the resolution of the display or host window in DPI.

Implemented in CEGUI::OgreRenderer, CEGUI::OpenGLESRenderer, CEGUI::Direct3D11Renderer, CEGUI::IrrlichtRenderer, CEGUI::Direct3D9Renderer, CEGUI::Direct3D10Renderer, CEGUI::NullRenderer, CEGUI::OpenGLRendererBase, and CEGUI::DirectFBRenderer.

virtual const Sizef& CEGUI::Renderer::getDisplaySize ( ) const
pure virtual

Return the size of the display or host window in pixels.

Returns
Size object describing the pixel dimesntions of the current display or host window.

Implemented in CEGUI::OgreRenderer, CEGUI::OpenGLESRenderer, CEGUI::Direct3D11Renderer, CEGUI::IrrlichtRenderer, CEGUI::Direct3D9Renderer, CEGUI::Direct3D10Renderer, CEGUI::NullRenderer, CEGUI::OpenGLRendererBase, and CEGUI::DirectFBRenderer.

virtual const String& CEGUI::Renderer::getIdentifierString ( ) const
pure virtual

Return identification string for the renderer module.

Returns
String object holding text that identifies the Renderer in use.

Implemented in CEGUI::OgreRenderer, CEGUI::OpenGLESRenderer, CEGUI::Direct3D11Renderer, CEGUI::IrrlichtRenderer, CEGUI::Direct3D9Renderer, CEGUI::Direct3D10Renderer, CEGUI::NullRenderer, CEGUI::OpenGLRendererBase, and CEGUI::DirectFBRenderer.

virtual uint CEGUI::Renderer::getMaxTextureSize ( ) const
pure virtual

Return the pixel size of the maximum supported texture.

Returns
Size of the maximum supported texture in pixels.

Implemented in CEGUI::OgreRenderer, CEGUI::OpenGLESRenderer, CEGUI::Direct3D11Renderer, CEGUI::IrrlichtRenderer, CEGUI::Direct3D9Renderer, CEGUI::Direct3D10Renderer, CEGUI::NullRenderer, CEGUI::OpenGLRendererBase, and CEGUI::DirectFBRenderer.

virtual Texture& CEGUI::Renderer::getTexture ( const String name) const
pure virtual

Return a Texture object that was previously created by calling the createTexture functions.

Parameters
nameString holding the name of the Texture object to be returned.

Implemented in CEGUI::OgreRenderer, CEGUI::OpenGLESRenderer, CEGUI::Direct3D11Renderer, CEGUI::IrrlichtRenderer, CEGUI::Direct3D9Renderer, CEGUI::Direct3D10Renderer, CEGUI::NullRenderer, CEGUI::OpenGLRendererBase, and CEGUI::DirectFBRenderer.

virtual void CEGUI::Renderer::setDisplaySize ( const Sizef size)
pure 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.
Note
The Renderer implementation should not use this function other than to perform internal state updates on the Renderer and related objects.
Parameters
sizeSize object describing the dimesions of the current or host window in pixels.

Implemented in CEGUI::OgreRenderer, CEGUI::OpenGLESRenderer, CEGUI::Direct3D11Renderer, CEGUI::IrrlichtRenderer, CEGUI::Direct3D9Renderer, CEGUI::Direct3D10Renderer, CEGUI::NullRenderer, CEGUI::OpenGLRendererBase, and CEGUI::DirectFBRenderer.