Classes | |
struct | QuadInfo |
structure holding details about a quad to be drawn | |
struct | QuadVertex |
FVF structure used for all vertices. | |
Public Member Functions | |
DirectX81Renderer (LPDIRECT3DDEVICE8 device, uint max_quads=0) | |
Constructor for Direct3D 8.1 Renderer object. | |
DirectX81Renderer (LPDIRECT3DDEVICE8 device, const Size &sz) | |
Constructor for Direct3D 8.1 Renderer object. | |
virtual | ~DirectX81Renderer (void) |
Destructor for DirectX81Renderer 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 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. | |
LPDIRECT3DDEVICE8 | getDevice (void) const |
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. | |
virtual void | preD3DReset (void) |
Direct3D support method that must be called prior to a Reset call on the Direct3DDevice; this is required so that the GUI renderer can release any unmanaged D3D resources as needed for the device reset to succeed. | |
virtual void | postD3DReset (void) |
Direct3D support method that must be called after a Reset call on the Direct3DDevice; this is required so that the GUI renderer can rebuild any unmanaged D3D resources after the device has been reset. | |
void | setDisplaySize (const Size &sz) |
Set the size of the display in pixels. |
CEGUI::DirectX81Renderer::DirectX81Renderer | ( | LPDIRECT3DDEVICE8 | device, | |
uint | max_quads = 0 | |||
) |
Constructor for Direct3D 8.1 Renderer object.
device | Pointer to the IDirect3DDevice8 interface object that will be used for all rendering | |
max_quads | Obsolete. Set to 0. |
References CEGUI::Size::d_height, and CEGUI::Size::d_width.
CEGUI::DirectX81Renderer::DirectX81Renderer | ( | LPDIRECT3DDEVICE8 | device, | |
const Size & | sz | |||
) |
void CEGUI::DirectX81Renderer::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::ColourRect::d_bottom_left, CEGUI::ColourRect::d_bottom_right, CEGUI::ColourRect::d_top_left, CEGUI::ColourRect::d_top_right, and CEGUI::colour::getARGB().
void CEGUI::DirectX81Renderer::clearRenderList | ( | void | ) | [virtual] |
Texture * CEGUI::DirectX81Renderer::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::DirectX81Texture::setD3DTextureSize().
Texture * CEGUI::DirectX81Renderer::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::DirectX81Texture::loadFromFile().
Texture * CEGUI::DirectX81Renderer::createTexture | ( | void | ) | [virtual] |
Creates a 'null' Texture object.
Implements CEGUI::Renderer.
void CEGUI::DirectX81Renderer::destroyAllTextures | ( | void | ) | [virtual] |
Destroy all Texture objects.
Implements CEGUI::Renderer.
References destroyTexture().
Referenced by ~DirectX81Renderer().
void CEGUI::DirectX81Renderer::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::DirectX81Renderer::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.
References CEGUI::TopLeftToBottomRight.
virtual float CEGUI::DirectX81Renderer::getHeight | ( | void | ) | const [inline, virtual] |
Return the current height of the display in pixels.
Implements CEGUI::Renderer.
virtual uint CEGUI::DirectX81Renderer::getHorzScreenDPI | ( | void | ) | const [inline, virtual] |
Return the horizontal display resolution dpi.
Implements CEGUI::Renderer.
virtual uint CEGUI::DirectX81Renderer::getMaxTextureSize | ( | void | ) | const [inline, virtual] |
Return the maximum texture size available.
Implements CEGUI::Renderer.
virtual Rect CEGUI::DirectX81Renderer::getRect | ( | void | ) | const [inline, virtual] |
Return a Rect describing the screen.
Implements CEGUI::Renderer.
virtual Size CEGUI::DirectX81Renderer::getSize | ( | void | ) | const [inline, virtual] |
Return the size of the display in pixels.
Implements CEGUI::Renderer.
virtual uint CEGUI::DirectX81Renderer::getVertScreenDPI | ( | void | ) | const [inline, virtual] |
Return the vertical display resolution dpi.
Implements CEGUI::Renderer.
virtual float CEGUI::DirectX81Renderer::getWidth | ( | void | ) | const [inline, virtual] |
Return the current width of the display in pixels.
Implements CEGUI::Renderer.
virtual bool CEGUI::DirectX81Renderer::isQueueingEnabled | ( | void | ) | const [inline, virtual] |
Return whether queueing is enabled.
Implements CEGUI::Renderer.
void CEGUI::DirectX81Renderer::setDisplaySize | ( | const Size & | sz | ) |
Set the size of the display in pixels.
This method is important if your D3D 8 device is a pure device; since with a pure device the system is unable to determine the size of the view port, so you must manually tell it the size by using this method.
sz | Size object describing the size of the display. |
References CEGUI::Renderer::EventDisplaySizeChanged, CEGUI::Renderer::EventNamespace, CEGUI::EventSet::fireEvent(), CEGUI::Rect::getSize(), and CEGUI::Rect::setSize().
Referenced by postD3DReset().
virtual void CEGUI::DirectX81Renderer::setQueueingEnabled | ( | bool | setting | ) | [inline, 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.