EX sx::Pass::Pass |
( |
const string & |
id | ) |
|
Adds a RenderObject object to the Pass. Object will be rendered every time the render method of the pass is invoced.
EX void sx::Pass::addTempRenderObjects |
( |
const vector< RenderObject * > & |
temp | ) |
|
Adds RenderObjects, which will be only rendered the next time method render in Pass is invoced. Those RenderObjects will be rendered in the order given by temp.
EX void sx::Pass::addUniform |
( |
Uniform & |
uniform | ) |
|
Adds a uniform variable to the Pass. The uniform's name must be unique in the Pass, otherwise an exception is thrown.
- Parameters
-
uniform | a uniform variable |
- Exceptions
-
if | the name of the uniform variable isn't unique in the set of uniforms, an exception Exception of type EX_AMBIGUOUS is thrown |
static EX void sx::Pass::applyWireframe |
( |
bool |
wireframe | ) |
|
|
static |
If wireframe is true, the RenderObjects rendered after the call of this function are rendered in wireframe. Otherwise the inside of the polygons is filled with fragments.
EX void sx::Pass::execute |
( |
vector< string > & |
input | ) |
|
|
virtual |
EX BlendFactor sx::Pass::getFragmentBlendFactor |
( |
| ) |
const |
EX Shader* sx::Pass::getShader |
( |
| ) |
|
EX BlendFactor sx::Pass::getTargetBlendFactor |
( |
| ) |
const |
EX vector<RenderObject *>& sx::Pass::getTempRenderObjects |
( |
| ) |
|
Returns a reference to an empty vector. The RenderObjects inserted into this reference will be rendered the next time method render in Pass is invoced. Those RenderObjects will be rendered in the order they are inserted into the vector.
EX bool sx::Pass::isClearingColorBuffer |
( |
| ) |
const |
EX bool sx::Pass::isClearingDepthBuffer |
( |
| ) |
const |
EX bool sx::Pass::isLoaded |
( |
| ) |
const |
|
virtual |
as this is always loaded, the return value is always true
Implements sx::SXResource.
EX bool sx::Pass::isVisible |
( |
| ) |
const |
EX bool sx::Pass::isWireframe |
( |
| ) |
const |
EX bool sx::Pass::isWritingDepthBuffer |
( |
| ) |
|
Returns wether rendering into the rendertarget has an effect on the depthbuffer or not.
- Returns
- true iff rendering into the rendertarget alters the depthbuffer
EX void sx::Pass::load |
( |
| ) |
|
|
virtual |
as this is always loaded, this method has no effect on this
Implements sx::SXResource.
EX void sx::Pass::removeRenderObject |
( |
const string & |
id | ) |
|
EX void sx::Pass::removeRenderObjects |
( |
| ) |
|
Removes all RenderObjects, which were inserted with addRenderObject. Those RenderObjects won't be rendered again.
EX void sx::Pass::removeUniform |
( |
const string & |
name | ) |
|
Removes the uniform named name. If such a uniform variable doesn't exist, an exception is thrown.
- Parameters
-
name | name of the uniform variable |
- Exceptions
-
if | a uniform variable named name doesn't exist, an Exception of type EX_NODATA is thrown |
EX void sx::Pass::removeUniforms |
( |
| ) |
|
EX void sx::Pass::render |
( |
| ) |
|
Renders all RenderObjects to the rendertarget, and the textures, if a rendertarget with textures is set. Renders all RenderObjects to the rendertarget, and the volumes, if a rendertarget with volumes is set. Stores the geometry generated with RenderObjects in geometryTarget, if geometryTarget is set. If no shader is attached to a RenderObject, the shader of the pass is used. If no rendertarget has been specified, the method doesn't do anything. If visible is false, the method doesn't do anything. Iff both shaders are null, or mesh is null, render doesn't do anything.
EX void sx::Pass::setClearColorBuffer |
( |
bool |
clear | ) |
|
EX void sx::Pass::setClearDepthBuffer |
( |
bool |
clear | ) |
|
EX void sx::Pass::setDepthTest |
( |
DepthTest |
test | ) |
|
EX void sx::Pass::setFragmentBlendFactor |
( |
BlendFactor |
factor | ) |
|
EX void sx::Pass::setLayerCoordinate |
( |
UniformFloat * |
layerCoordinate | ) |
|
Assigns a RenderTarget to Pass. The output of pass is rendered to the textures in targets. If RenderTarget target is the display, the textures in targets remain unchanged. If no RenderTarget is set, method render doesn't do anything.
Assigns a RenderTarget to Pass. The output of pass is rendered to the textures in targets. If RenderTarget target is the display, the textures in targets remain unchanged. If no RenderTarget is set, method render doesn't do anything.
Assigns a geometry target to Pass. The geometry generated by method render() is stored in the BufferedMesh target. The method will only render geometry to those VertexBuffers, which have identifiers added to the shader of Pass with method addTransformFeedbackBuffer(). If target is 0, no geometry target is used.
EX void sx::Pass::setShader |
( |
Shader * |
shader | ) |
|
EX void sx::Pass::setStartLayer |
( |
UniformFloat * |
startLayer | ) |
|
EX void sx::Pass::setTargetBlendFactor |
( |
BlendFactor |
factor | ) |
|
EX void sx::Pass::setVisible |
( |
bool |
visible | ) |
|
EX void sx::Pass::setWireframe |
( |
bool |
wireframe | ) |
|
EX void sx::Pass::setWriteDepthBuffer |
( |
bool |
write | ) |
|
Determines, if rendering into the rendertarget has an effect on the depthbuffer or not.
- Parameters
-
write | true iff rendering into the rendertarget should alter the depthbuffer |
EX void sx::Pass::useBackgroundQuad |
( |
bool |
use | ) |
|
Determines if a background quad is rendered. If use equals true, a call of render() will render the RenderObject backgroundQuad. If use equals false, the backgroundQuad will not be rendered by a call of render(). If another RenderObject with id "sx.engine.core.Pass.cpp.backgroundQuad" was added to the Pass with method addRenderObject, useBackgroundQuad has no effect. The backgroundQuad is made of two triangles with two buffers: vertices(attributeSize = 3): triangle nr1: -1 -1 0 1 -1 0 1 1 0 triangle nr2: -1 -1 0 1 1 0 -1 1 0 texcoords(attributeSize = 2): triangle nr1: 0 0 1 0 1 1 triangle nr2: 0 0 1 1 0 1
The documentation for this class was generated from the following file: