Crazy Eddies GUI System 0.7.5
Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes

CEGUI::DirectFBRenderer Class Reference

Implementation of CEGUI::Renderer interface using DirectFB. More...

Inheritance diagram for CEGUI::DirectFBRenderer:
Collaboration diagram for CEGUI::DirectFBRenderer:

List of all members.

Public Member Functions

IDirectFBSurface & getTargetSurface () const
 Return the current target DirectFB surface.
void setTargetSurface (IDirectFBSurface &surface)
 Set the target DirectFB surface.
RenderingRootgetDefaultRenderingRoot ()
 Return the default rendering root for the renderer. The default rendering root is typically a RenderingRoot that targets the entire screen (or rendering window).
GeometryBuffercreateGeometryBuffer ()
 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.
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.
void destroyAllGeometryBuffers ()
 Destroy all GeometryBuffer objects created by this Renderer.
TextureTargetcreateTextureTarget ()
 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.
void destroyTextureTarget (TextureTarget *target)
 Function that cleans up TextureTarget objects created with the createTextureTarget function.
void destroyAllTextureTargets ()
 Destory all TextureTarget objects created by this Renderer.
TexturecreateTexture ()
 Create a 'null' Texture object.
TexturecreateTexture (const String &filename, const String &resourceGroup)
 Create a Texture object using the given image file.
TexturecreateTexture (const Size &size)
 Create a Texture object with the given pixel dimensions as specified by size.
void destroyTexture (Texture &texture)
 Destroy a Texture object that was previously created by calling the createTexture functions.
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.
const SizegetDisplaySize () const
 Return the size of the display or host window in pixels.
const Vector2getDisplayDPI () const
 Return the resolution of the display or host window in dots per inch.
uint getMaxTextureSize () const
 Return the pixel size of the maximum supported texture.
const StringgetIdentifierString () const
 Return identification string for the renderer module.

Static Public Member Functions

static DirectFBRenderercreate (IDirectFB &directfb, IDirectFBSurface &surface)
 create a DirectFBRenderer object.
static void destroy (DirectFBRenderer &renderer)
 destroy a DirectFBRenderer object created by the create call.

Protected Types

typedef std::vector
< TextureTarget * > 
TextureTargetList
 container type used to hold TextureTargets we create.
typedef std::vector
< DirectFBGeometryBuffer * > 
GeometryBufferList
 container type used to hold GeometryBuffers we create.
typedef std::vector
< DirectFBTexture * > 
TextureList
 container type used to hold Textures we create.

Protected Member Functions

 DirectFBRenderer (IDirectFB &directfb, IDirectFBSurface &surface)
 Constructor.
 ~DirectFBRenderer ()
 Destructor.

Protected Attributes

IDirectFB & d_directfb
 DirectFB interface we were given when constructed.
IDirectFBSurface & d_rootSurface
 The DirectFB surface to be used as the default root target.
IDirectFBSurface * d_targetSurface
 The current target DirectFB surface.
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.
RenderTargetd_defaultTarget
 The default RenderTarget (used by d_defaultRoot)
RenderingRootd_defaultRoot
 The default rendering root object.
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.

Static Protected Attributes

static String d_rendererID
 String holding the renderer identification text.

Detailed Description

Implementation of CEGUI::Renderer interface using DirectFB.


Member Function Documentation

GeometryBuffer& CEGUI::DirectFBRenderer::createGeometryBuffer ( ) [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.

Implements CEGUI::Renderer.

Texture& CEGUI::DirectFBRenderer::createTexture ( ) [virtual]

Create a 'null' Texture object.

Returns:
A newly created Texture object. The returned Texture object has no size or imagery associated with it.

Implements CEGUI::Renderer.

Texture& CEGUI::DirectFBRenderer::createTexture ( const String filename,
const String resourceGroup 
) [virtual]

Create a Texture object using the given image file.

Parameters:
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.

Implements CEGUI::Renderer.

Texture& CEGUI::DirectFBRenderer::createTexture ( const Size size) [virtual]

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

Parameters:
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.

Implements CEGUI::Renderer.

TextureTarget* CEGUI::DirectFBRenderer::createTextureTarget ( ) [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.

Implements CEGUI::Renderer.

void CEGUI::DirectFBRenderer::destroyGeometryBuffer ( const GeometryBuffer buffer) [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.

Implements CEGUI::Renderer.

void CEGUI::DirectFBRenderer::destroyTexture ( Texture texture) [virtual]

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

Parameters:
textureTexture object to be destroyed.

Implements CEGUI::Renderer.

void CEGUI::DirectFBRenderer::destroyTextureTarget ( TextureTarget target) [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.

Implements CEGUI::Renderer.

RenderingRoot& CEGUI::DirectFBRenderer::getDefaultRenderingRoot ( ) [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).

Returns:
RenderingRoot object that is the default RenderingSurface provided by the Renderer.

Implements CEGUI::Renderer.

const Vector2& CEGUI::DirectFBRenderer::getDisplayDPI ( ) const [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.

Implements CEGUI::Renderer.

const Size& CEGUI::DirectFBRenderer::getDisplaySize ( ) const [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.

Implements CEGUI::Renderer.

const String& CEGUI::DirectFBRenderer::getIdentifierString ( ) const [virtual]

Return identification string for the renderer module.

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

Implements CEGUI::Renderer.

uint CEGUI::DirectFBRenderer::getMaxTextureSize ( ) const [virtual]

Return the pixel size of the maximum supported texture.

Returns:
Size of the maximum supported texture in pixels.

Implements CEGUI::Renderer.

void CEGUI::DirectFBRenderer::setDisplaySize ( const Size size) [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.

Implements CEGUI::Renderer.