Classes | |
struct | quadsorter |
struct | RenderQuad |
Public Member Functions | |
IrrlichtRenderer (irr::IrrlichtDevice *dev, bool bWithIrrlichtResourceProvicer=false) | |
create the irrlicht renderer | |
virtual | ~IrrlichtRenderer () |
virtual ResourceProvider * | createResourceProvider (void) |
bool | OnEvent (const irr::SEvent &event) |
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 queueing 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. | |
virtual bool | isQueueingEnabled (void) const |
Return whether queueing 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. | |
void | setDisplaySize (const Size &sz) |
Set the size of the display in pixels. |
CEGUI::IrrlichtRenderer::IrrlichtRenderer | ( | irr::IrrlichtDevice * | dev, | |
bool | bWithIrrlichtResourceProvicer = false | |||
) |
create the irrlicht renderer
constructor
dev | pointer to irr::IrrlichtDevice value specifying the irrlicht device | |
bWithIrrlichtResourceProvicer | bool specifying wether to use an irrlicht- or defautresourceprovider (default) |
References CEGUI::Renderer::d_identifierString, and CEGUI::Renderer::d_resourceProvider.
CEGUI::IrrlichtRenderer::~IrrlichtRenderer | ( | ) | [virtual] |
destructor
void CEGUI::IrrlichtRenderer::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_bottom, CEGUI::Rect::d_left, CEGUI::Rect::d_right, CEGUI::Rect::d_top, doRender(), CEGUI::Texture::getHeight(), and CEGUI::Texture::getWidth().
void CEGUI::IrrlichtRenderer::clearRenderList | ( | void | ) | [virtual] |
ResourceProvider * CEGUI::IrrlichtRenderer::createResourceProvider | ( | void | ) | [virtual] |
get an irrlicht resource provider
Reimplemented from CEGUI::Renderer.
References CEGUI::Renderer::d_resourceProvider.
Texture * CEGUI::IrrlichtRenderer::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.
Texture * CEGUI::IrrlichtRenderer::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 passed to the resource provider. |
Implements CEGUI::Renderer.
Texture * CEGUI::IrrlichtRenderer::createTexture | ( | void | ) | [virtual] |
Creates a 'null' Texture object.
Implements CEGUI::Renderer.
void CEGUI::IrrlichtRenderer::destroyAllTextures | ( | void | ) | [virtual] |
void CEGUI::IrrlichtRenderer::destroyTexture | ( | Texture * | texture | ) | [virtual] |
Destroy the given Texture object.
texture | pointer to the Texture object to be destroyed |
Implements CEGUI::Renderer.
void CEGUI::IrrlichtRenderer::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().
float CEGUI::IrrlichtRenderer::getHeight | ( | void | ) | const [virtual] |
Return the current height of the display in pixels.
Implements CEGUI::Renderer.
uint CEGUI::IrrlichtRenderer::getHorzScreenDPI | ( | void | ) | const [virtual] |
Return the horizontal display resolution dpi.
Implements CEGUI::Renderer.
uint CEGUI::IrrlichtRenderer::getMaxTextureSize | ( | void | ) | const [virtual] |
Return the maximum texture size available.
Implements CEGUI::Renderer.
Rect CEGUI::IrrlichtRenderer::getRect | ( | void | ) | const [virtual] |
Return a Rect describing the screen.
Implements CEGUI::Renderer.
Size CEGUI::IrrlichtRenderer::getSize | ( | void | ) | const [virtual] |
Return the size of the display in pixels.
Implements CEGUI::Renderer.
uint CEGUI::IrrlichtRenderer::getVertScreenDPI | ( | void | ) | const [virtual] |
Return the vertical display resolution dpi.
Implements CEGUI::Renderer.
float CEGUI::IrrlichtRenderer::getWidth | ( | void | ) | const [virtual] |
Return the current width of the display in pixels.
Implements CEGUI::Renderer.
bool CEGUI::IrrlichtRenderer::isQueueingEnabled | ( | void | ) | const [virtual] |
Return whether queueing is enabled.
Implements CEGUI::Renderer.
bool CEGUI::IrrlichtRenderer::OnEvent | ( | const irr::SEvent & | event | ) |
forward event to CEGUI system
void CEGUI::IrrlichtRenderer::setDisplaySize | ( | const Size & | sz | ) |
Set the size of the display in pixels.
If your viewport size changes, you can call this function with the new size in pixels to update the rendering area.
sz | Size object describing the size of the display. |
References CEGUI::Size::d_height, CEGUI::Size::d_width, CEGUI::Renderer::EventDisplaySizeChanged, CEGUI::Renderer::EventNamespace, and CEGUI::EventSet::fireEvent().
void CEGUI::IrrlichtRenderer::setQueueingEnabled | ( | bool | setting | ) | [virtual] |
Enable or disable the queueing of quads from this point on.
This only affects queueing. If queueing is turned off, any calls to addQuad will cause the quad to be rendered directly. Note that disabling queueing 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 queueing had never been disabled.
setting | true to enable queueing, or false to disable queueing (see notes above). |
Implements CEGUI::Renderer.