Classes | |
struct | quadsorter |
struct | RenderQuad |
structure holding details about a quad to be drawn | |
Public Member Functions | |
DirectfbRenderer (IDirectFB *device, IDirectFBSurface *surface, ImageCodec *codec=0) | |
Constructor for Directfb Renderer object. | |
virtual | ~DirectfbRenderer (void) |
Destructor for DirectfbRenderer objects. | |
virtual void | addQuad (const Rect &dest_rect, float z, const Texture *tex, const Rect &texture_rect, const ColourRect &colours, QuadSplitMode quad_split_mode) |
Add a quad to the rendering queue. All clipping and other adjustments should have been made prior to calling this. | |
virtual void | doRender (void) |
Perform final rendering for all quads that have been queued for rendering. | |
virtual void | clearRenderList (void) |
Clears all queued quads from the render queue. | |
virtual void | setQueueingEnabled (bool setting) |
Enable or disable the queuing of quads from this point on. | |
virtual Texture * | createTexture (void) |
Creates a 'null' Texture object. | |
virtual Texture * | createTexture (const String &filename, const String &resourceGroup) |
Create a Texture object using the given image file. | |
virtual Texture * | createTexture (float size) |
Create a Texture object with the given pixel dimensions as specified by size. NB: Textures are always square. | |
virtual void | destroyTexture (Texture *texture) |
Destroy the given Texture object. | |
virtual void | destroyAllTextures (void) |
Destroy all Texture objects. | |
IDirectFB * | getDevice (void) const |
virtual bool | isQueueingEnabled (void) const |
Return whether queuing is enabled. | |
virtual float | getWidth (void) const |
Return the current width of the display in pixels. | |
virtual float | getHeight (void) const |
Return the current height of the display in pixels. | |
virtual Size | getSize (void) const |
Return the size of the display in pixels. | |
virtual Rect | getRect (void) const |
Return a Rect describing the screen. | |
virtual uint | getMaxTextureSize (void) const |
Return the maximum texture size available. | |
virtual uint | getHorzScreenDPI (void) const |
Return the horizontal display resolution dpi. | |
virtual uint | getVertScreenDPI (void) const |
Return the vertical display resolution dpi. | |
ImageCodec & | getImageCodec (void) |
Retrieve the image codec used internaly. | |
void | setImageCodec (const String &codecName) |
Set the image codec to use for loading textures. | |
void | setImageCodec (ImageCodec *codec) |
Set the image codec to use from an existing image codec. | |
Static Public Member Functions | |
static void | setDefaultImageCodecName (const String &codecName) |
Set the name of the default image codec to be used. | |
static const String & | getDefaultImageCodecName () |
Get the name of the default image codec. |
CEGUI::DirectfbRenderer::DirectfbRenderer | ( | IDirectFB * | device, | |
IDirectFBSurface * | surface, | |||
ImageCodec * | codec = 0 | |||
) |
Constructor for Directfb Renderer object.
window | A pointer to the Directfb surface |
References CEGUI::Rect::d_bottom, CEGUI::Renderer::d_identifierString, CEGUI::Rect::d_left, CEGUI::Rect::d_right, and CEGUI::Rect::d_top.
void CEGUI::DirectfbRenderer::addQuad | ( | const Rect & | dest_rect, | |
float | z, | |||
const Texture * | tex, | |||
const Rect & | texture_rect, | |||
const ColourRect & | colours, | |||
QuadSplitMode | quad_split_mode | |||
) | [virtual] |
Add a quad to the rendering queue. All clipping and other adjustments should have been made prior to calling this.
dest_rect | Rect object describing the destination area (values are in pixels) | |
z | float value specifying the z co-ordinate / z order of the quad | |
tex | pointer to the Texture object that holds the imagery to be rendered | |
texture_rect | Rect object holding the area of tex that is to be rendered (values are in texture co-ordinates). | |
colours | ColourRect object describing the colour values that are to be applied when rendering. | |
quad_split_mode | One of the QuadSplitMode values specifying the way quads are split into triangles |
Implements CEGUI::Renderer.
References CEGUI::Rect::d_top, doRender(), CEGUI::Texture::getHeight(), and CEGUI::Texture::getWidth().
void CEGUI::DirectfbRenderer::clearRenderList | ( | void | ) | [virtual] |
Texture * CEGUI::DirectfbRenderer::createTexture | ( | float | size | ) | [virtual] |
Create a Texture object with the given pixel dimensions as specified by size. NB: Textures are always square.
size | float value that specifies the size to use for the width and height when creating the new texture. |
Implements CEGUI::Renderer.
References CEGUI::DirectfbTexture::setFBTextureSize().
Texture * CEGUI::DirectfbRenderer::createTexture | ( | const String & | filename, | |
const String & | resourceGroup | |||
) | [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 | Resource group identifier to be passed to the resource provider when loading the texture file. |
Implements CEGUI::Renderer.
References CEGUI::DirectfbTexture::loadFromFile().
Texture * CEGUI::DirectfbRenderer::createTexture | ( | void | ) | [virtual] |
Creates a 'null' Texture object.
Implements CEGUI::Renderer.
void CEGUI::DirectfbRenderer::destroyAllTextures | ( | void | ) | [virtual] |
Destroy all Texture objects.
Implements CEGUI::Renderer.
References destroyTexture().
Referenced by ~DirectfbRenderer().
void CEGUI::DirectfbRenderer::destroyTexture | ( | Texture * | texture | ) | [virtual] |
Destroy the given Texture object.
texture | pointer to the Texture object to be destroyed |
Implements CEGUI::Renderer.
Referenced by destroyAllTextures().
void CEGUI::DirectfbRenderer::doRender | ( | void | ) | [virtual] |
Perform final rendering for all quads that have been queued for rendering.
The contents of the rendering queue is retained and can be rendered again as required. If the contents is not required call clearRenderList().
Implements CEGUI::Renderer.
Referenced by addQuad().
virtual float CEGUI::DirectfbRenderer::getHeight | ( | void | ) | const [inline, virtual] |
Return the current height of the display in pixels.
Implements CEGUI::Renderer.
References CEGUI::Rect::getHeight().
virtual uint CEGUI::DirectfbRenderer::getHorzScreenDPI | ( | void | ) | const [inline, virtual] |
Return the horizontal display resolution dpi.
Implements CEGUI::Renderer.
virtual uint CEGUI::DirectfbRenderer::getMaxTextureSize | ( | void | ) | const [inline, virtual] |
Return the maximum texture size available.
Implements CEGUI::Renderer.
virtual Rect CEGUI::DirectfbRenderer::getRect | ( | void | ) | const [inline, virtual] |
Return a Rect describing the screen.
Implements CEGUI::Renderer.
virtual Size CEGUI::DirectfbRenderer::getSize | ( | void | ) | const [inline, virtual] |
Return the size of the display in pixels.
Implements CEGUI::Renderer.
References CEGUI::Rect::getSize().
virtual uint CEGUI::DirectfbRenderer::getVertScreenDPI | ( | void | ) | const [inline, virtual] |
Return the vertical display resolution dpi.
Implements CEGUI::Renderer.
virtual float CEGUI::DirectfbRenderer::getWidth | ( | void | ) | const [inline, virtual] |
Return the current width of the display in pixels.
Implements CEGUI::Renderer.
References CEGUI::Rect::getWidth().
virtual bool CEGUI::DirectfbRenderer::isQueueingEnabled | ( | void | ) | const [inline, virtual] |
Return whether queuing is enabled.
Implements CEGUI::Renderer.
void CEGUI::DirectfbRenderer::setImageCodec | ( | ImageCodec * | codec | ) |
Set the image codec to use from an existing image codec.
In this case the renderer does not take the ownership of the image codec object.
codec | a pointer to an image codec object |
virtual void CEGUI::DirectfbRenderer::setQueueingEnabled | ( | bool | setting | ) | [inline, virtual] |
Enable or disable the queuing of quads from this point on.
This only affects queuing. If queuing is turned off, any calls to addQuad will cause the quad to be rendered directly. Note that disabling queuing will not cause currently queued quads to be rendered, nor is the queue cleared - at any time the queue can still be drawn by calling doRender, and the list can be cleared by calling clearRenderList. Re-enabling the queue causes subsequent quads to be added as if queuing had never been disabled.
setting | true to enable queuing, or false to disable queuing (see notes above). |
Implements CEGUI::Renderer.