RenderTarget Class Reference

This reference page is linked to from the following overview topics: Render to Texture and Multi-Target Rendering, System Events.



Detailed Description

RenderTarget is an abstraction of an OpenGL renderbuffer object.

You can attach multiple textures to the different 'slots' of this RenderTarget, to do multi-target rendering. Textures attached to slot0, slot1, slot2 and slot3 will all get the color; A Texture attached to slotDepth would get the zbuffer.

Definition at line 901 of file material.h.

#include <material.h>

Inheritance diagram for RenderTarget:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual void  DrawTexture (const class Texture *pTexture)
  Paints the given texture into the rendertarget, stretching or shrinking it to fill the available space.
virtual bool  Attach (mudbox::Texture *pTexture, Slot eSlot=eSlotColor0)
  Attaches a texture to the RenderTarget.
virtual void  Detach (Slot eSlot=eSlotColor0)
  Detaches a texture from a slot in the rendertarget.
virtual mudbox::Texture Texture (Slot eSlot=eSlotColor0) const
  Returns the attached texture at a given slot.
virtual unsigned int  Width (void) const
  Returns the width of the rendertarget in pixels.
virtual unsigned int  Height (void) const
  Returns the height of the rendertarget in pixels.
virtual void  SetSize (unsigned int iWidth, unsigned int iHeight)
  Sets the size of the rendertarget in pixels.
virtual void  Activate (void)
  Makes this rendertarget active, but saves the previous one.
virtual void  Restore (void)
  Restores the previous rendertarget.
virtual void  SetMultisampling (bool bMultisampling)

Member Function Documentation

virtual void DrawTexture ( const class Texture pTexture ) [virtual]

Paints the given texture into the rendertarget, stretching or shrinking it to fill the available space.

virtual bool Attach ( mudbox::Texture pTexture,
Slot  eSlot = eSlotColor0 
) [virtual]

Attaches a texture to the RenderTarget.

The texture must have exactly the same size as the target.

Parameters:
[in] pTexture The texture to be attached to the RenderTarget
[in] eSlot The slot to attach it to
virtual void Detach ( Slot  eSlot = eSlotColor0 ) [virtual]

Detaches a texture from a slot in the rendertarget.

Parameters:
[in] eSlot The slot to detach a texture from
virtual mudbox::Texture* Texture ( Slot  eSlot = eSlotColor0 ) const [virtual]

Returns the attached texture at a given slot.

Parameters:
[in] eSlot The id for the slot being queried
virtual unsigned int Width ( void  ) const [virtual]

Returns the width of the rendertarget in pixels.

virtual unsigned int Height ( void  ) const [virtual]

Returns the height of the rendertarget in pixels.

virtual void SetSize ( unsigned int  iWidth,
unsigned int  iHeight 
) [virtual]

Sets the size of the rendertarget in pixels.

virtual void Activate ( void  ) [virtual]

Makes this rendertarget active, but saves the previous one.

virtual void Restore ( void  ) [virtual]

Restores the previous rendertarget.

virtual void SetMultisampling ( bool  bMultisampling ) [virtual]

Set Multisample tag. To be removed.


The documentation for this class was generated from the following file:

RenderTarget RenderTarget RenderTarget RenderTarget RenderTarget RenderTarget RenderTarget RenderTarget RenderTarget RenderTarget
RenderTarget RenderTarget RenderTarget RenderTarget RenderTarget RenderTarget RenderTarget RenderTarget RenderTarget RenderTarget