CEGUI::DirectX10Renderer Class Reference

Renderer class to interface with Microsoft DirectX 10.0. More...

Inheritance diagram for CEGUI::DirectX10Renderer:

Inheritance graph
[legend]
Collaboration diagram for CEGUI::DirectX10Renderer:

Collaboration graph
[legend]

List of all members.

Classes

struct  QuadInfo
 structure holding details about a quad to be drawn.
struct  QuadVertex
 FVF structure used for all vertices.

Public Member Functions

 DirectX10Renderer (LPDIRECT3DDEVICE device, uint max_quads)
 Constructor for Direct3D 10.0 Renderer object.
virtual ~DirectX10Renderer (void)
 Destructor for DirectX10Renderer 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 TexturecreateTexture (void)
 Creates a 'null' Texture object.
virtual TexturecreateTexture (const String &filename, const String &resourceGroup)
 Create a Texture object using the given image file.
virtual TexturecreateTexture (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.
LPDIRECT3DDEVICE getDevice (void) const
 return a pointer to the D3D device.
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.


Detailed Description

Renderer class to interface with Microsoft DirectX 10.0.

Constructor & Destructor Documentation

CEGUI::DirectX10Renderer::DirectX10Renderer ( LPDIRECT3DDEVICE  device,
uint  max_quads 
)

Constructor for Direct3D 10.0 Renderer object.

Parameters:
device Pointer to the IDirect3DDevice10 interface object that will be used for all rendering
max_quads Obsolete. Set to 0.


Member Function Documentation

void CEGUI::DirectX10Renderer::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.

Parameters:
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
Returns:
Nothing

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::DirectX10Renderer::clearRenderList ( void   )  [virtual]

Clears all queued quads from the render queue.

Returns:
Nothing

Implements CEGUI::Renderer.

Texture * CEGUI::DirectX10Renderer::createTexture ( float  size  )  [virtual]

Create a Texture object with the given pixel dimensions as specified by size. NB: Textures are always square.

Parameters:
size float value that specifies the size to use for the width and height when creating the new texture.
Returns:
a newly created Texture object. The initial contents of the texture memory is undefined / random.
Note:
Textures are always created with a size that is a power of 2. If you specify a size that is not a power of two, the final size will be rounded up. So if you specify a size of 1024, the texture will be (1024 x 1024), however, if you specify a size of 1025, the texture will be (2048 x 2048). You can check the ultimate size by querying the texture after creation.

Implements CEGUI::Renderer.

References CEGUI::DirectX10Texture::setD3DTextureSize().

Texture * CEGUI::DirectX10Renderer::createTexture ( const String filename,
const String resourceGroup 
) [virtual]

Create a Texture object using the given image file.

Parameters:
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.
Returns:
a newly created Texture object. The initial contents of the texture memory is the requested image file.
Note:
Textures are always created with a size that is a power of 2. If the file you specify is of a size that is not a power of two, the final size will be rounded up. Additionally, textures are always square, so the ultimate size is governed by the larger of the width and height of the specified file. You can check the ultimate sizes by querying the texture after creation.

Implements CEGUI::Renderer.

References CEGUI::DirectX10Texture::loadFromFile().

Texture * CEGUI::DirectX10Renderer::createTexture ( void   )  [virtual]

Creates a 'null' Texture object.

Returns:
a newly created Texture object. The returned Texture object has no size or imagery associated with it, and is generally of little or no use.

Implements CEGUI::Renderer.

void CEGUI::DirectX10Renderer::destroyAllTextures ( void   )  [virtual]

Destroy all Texture objects.

Returns:
Nothing

Implements CEGUI::Renderer.

References destroyTexture().

Referenced by ~DirectX10Renderer().

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

Destroy the given Texture object.

Parameters:
texture pointer to the Texture object to be destroyed
Returns:
Nothing

Implements CEGUI::Renderer.

Referenced by destroyAllTextures().

void CEGUI::DirectX10Renderer::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().

Returns:
Nothing

Implements CEGUI::Renderer.

References CEGUI::TopLeftToBottomRight.

virtual float CEGUI::DirectX10Renderer::getHeight ( void   )  const [inline, virtual]

Return the current height of the display in pixels.

Returns:
float value equal to the current height of the display in pixels.

Implements CEGUI::Renderer.

virtual uint CEGUI::DirectX10Renderer::getHorzScreenDPI ( void   )  const [inline, virtual]

Return the horizontal display resolution dpi.

Returns:
horizontal resolution of the display in dpi.

Implements CEGUI::Renderer.

virtual uint CEGUI::DirectX10Renderer::getMaxTextureSize ( void   )  const [inline, virtual]

Return the maximum texture size available.

Returns:
Size of the maximum supported texture in pixels (textures are always assumed to be square)

Implements CEGUI::Renderer.

virtual Rect CEGUI::DirectX10Renderer::getRect ( void   )  const [inline, virtual]

Return a Rect describing the screen.

Returns:
A Rect object that describes the screen area. Typically, the top-left values are always 0, and the size of the area described is equal to the screen resolution.

Implements CEGUI::Renderer.

virtual Size CEGUI::DirectX10Renderer::getSize ( void   )  const [inline, virtual]

Return the size of the display in pixels.

Returns:
Size object describing the dimensions of the current display.

Implements CEGUI::Renderer.

virtual uint CEGUI::DirectX10Renderer::getVertScreenDPI ( void   )  const [inline, virtual]

Return the vertical display resolution dpi.

Returns:
vertical resolution of the display in dpi.

Implements CEGUI::Renderer.

virtual float CEGUI::DirectX10Renderer::getWidth ( void   )  const [inline, virtual]

Return the current width of the display in pixels.

Returns:
float value equal to the current width of the display in pixels.

Implements CEGUI::Renderer.

virtual bool CEGUI::DirectX10Renderer::isQueueingEnabled ( void   )  const [inline, virtual]

Return whether queueing is enabled.

Returns:
  • true if queueing is enabled.
  • false if queueing is disabled.

Implements CEGUI::Renderer.

void CEGUI::DirectX10Renderer::setDisplaySize ( const Size sz  ) 

Set the size of the display in pixels.

You do not have to call this method under normal operation as the system will automatically extract the size from the current view port.

Note:
This method will cause the EventDisplaySizeChanged event to fire if the display size has changed.
Parameters:
sz Size object describing the size of the display.
Returns:
Nothing.

References CEGUI::Renderer::EventDisplaySizeChanged, CEGUI::Renderer::EventNamespace, CEGUI::EventSet::fireEvent(), CEGUI::Rect::getSize(), and CEGUI::Rect::setSize().

virtual void CEGUI::DirectX10Renderer::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.

Parameters:
setting 
  • true to enable queueing
  • false to disable queueing (see notes above).
Returns:
Nothing

Implements CEGUI::Renderer.


Generated on Thu Nov 27 20:34:43 2008 for Crazy Eddies GUI System by  doxygen 1.5.7.1