fluidvis
Public Member Functions | Static Public Member Functions | List of all members
sx::RenderTarget Class Reference

#include <SXCore.h>

Inheritance diagram for sx::RenderTarget:
sx::SXResource

Public Member Functions

EX RenderTarget (const string &id)
 
EX ~RenderTarget ()
 
EX void setViewport ()
 
EX void setViewport (float xFactor, float yFactor, float widthFactor, float heightFactor)
 
EX void unload ()
 
EX void load ()
 
EX bool isLoaded () const
 
EX void beginRender (Shader &shader, vector< Texture * > &textures, const string &resourceID)
 
EX void beginRender (Shader &shader, vector< Volume * > &textures, unsigned int layer, const string &resourceID)
 
EX void endRender ()
 
EX void setRenderToDisplay (bool renderToDisplay)
 
EX bool isRenderingToDisplay () const
 
EX void setWidth (int width)
 
EX int getWidth () const
 
EX void setHeight (int height)
 
EX int getHeight () const
 
- Public Member Functions inherited from sx::SXResource
virtual EX ~SXResource ()
 
EX const string & getID () const
 

Static Public Member Functions

static EX void clearTarget ()
 
static EX void clearDepthBuffer ()
 
static EX void clearColorBuffer ()
 
static EX void applyDepthTest (DepthTest test)
 
static EX void applyWriteDepthBuffer (bool write)
 
static EX void applyBlendFactors (BlendFactor fragmentBlendFactor, BlendFactor targetBlendFactor)
 
static EX void setViewport (int x, int y, int width, int height)
 

Additional Inherited Members

- Protected Attributes inherited from sx::SXResource
string id
 

Detailed Description

framebuffer, used to render into textures

Constructor & Destructor Documentation

EX sx::RenderTarget::RenderTarget ( const string &  id)

constructor

EX sx::RenderTarget::~RenderTarget ( )

destructor

Member Function Documentation

static EX void sx::RenderTarget::applyBlendFactors ( BlendFactor  fragmentBlendFactor,
BlendFactor  targetBlendFactor 
)
static

Assigns values to the blendfactors. For a detailed description of the blendfactors see

See also
sx::BlendFactor
static EX void sx::RenderTarget::applyDepthTest ( DepthTest  test)
static

Determines, which kind of depthtest is executed. For a detailed description of test depthtest see

See also
sx::DepthTest
static EX void sx::RenderTarget::applyWriteDepthBuffer ( bool  write)
static

Determines, if rendering into the framebuffer has an effect on the depthbuffer or not.

Parameters
writetrue iff rendering into the framebuffer alters the depthbuffer
EX void sx::RenderTarget::beginRender ( Shader shader,
vector< Texture * > &  textures,
const string &  resourceID 
)

After this call, the next draw commands render into the textures from the parameter list. The framebuffer must be loaded, otherwise the method has no effect. The method only affects those textures which have the same width, height and pixelFormat.

EX void sx::RenderTarget::beginRender ( Shader shader,
vector< Volume * > &  textures,
unsigned int  layer,
const string &  resourceID 
)

After this call, the next draw commands render into the layer of number layer in the 3D textures from the parameter list. The framebuffer must be loaded, otherwise the method has no effect. The method only affects those textures which have the same width, height and pixelFormat.

static EX void sx::RenderTarget::clearColorBuffer ( )
static

deletes the color buffer of the currently set rendertarget

static EX void sx::RenderTarget::clearDepthBuffer ( )
static

deletes the depth buffer of the currently set rendertarget

static EX void sx::RenderTarget::clearTarget ( )
static

deletes the color and depth buffer of the currently set rendertarget

EX void sx::RenderTarget::endRender ( )

after this call, the next draw commands have no effect on the textures specified as rendertargets with beginRender

EX int sx::RenderTarget::getHeight ( ) const

getter of the loaded texture, if no texture is loaded, the return value isn't specified

EX int sx::RenderTarget::getWidth ( ) const

getter of the loaded texture, if no texture is loaded, the return value isn't specified

EX bool sx::RenderTarget::isLoaded ( ) const
virtual

returns true if a texture is loaded

Implements sx::SXResource.

EX bool sx::RenderTarget::isRenderingToDisplay ( ) const

true iff target renders to display

EX void sx::RenderTarget::load ( )
virtual

Deletes the last framebuffer, and loads a new one with the specified width, height and pixelFormat. If not enough information has been specified, the method has no effect.

Implements sx::SXResource.

EX void sx::RenderTarget::setHeight ( int  height)

Specifies the height of the next texture loaded by load(). If renderToDisplay is true, getHeight returns the value set by this method immediately.

EX void sx::RenderTarget::setRenderToDisplay ( bool  renderToDisplay)

Specifies if the content rendered to the target is displayed on the screen, and not rendered to textures after the load operation. If renderToDisplay is true, the target is loaded, and setWidth/Height have direct effect on getWidth/Height.

static EX void sx::RenderTarget::setViewport ( int  x,
int  y,
int  width,
int  height 
)
static

sets the viewport such that its lower left corner is at (x,y), and it has dimensions (width,height)

EX void sx::RenderTarget::setViewport ( )

covers the whole rendertarget with the viewport, if this is loaded

EX void sx::RenderTarget::setViewport ( float  xFactor,
float  yFactor,
float  widthFactor,
float  heightFactor 
)

sets the viewport such that its lower left corner is located at (width * xFactor, height * yFactor), and it has dimensions (width * widthFactor, height * heightFactor), if this is loaded

EX void sx::RenderTarget::setWidth ( int  width)

Specifies the width of the next texture loaded by load(). If renderToDisplay is true, getWidth returns the value set by this method immediately.

EX void sx::RenderTarget::unload ( )

deletes the last framebuffer, if loaded, and leaves the framebuffer unloaded


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