RAMSES Documentation  27.0.130
Information for RAMSES users and developers
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Friends | List of all members
ramses::Effect Class Reference

An effect describes how an object will be rendered to the screen. More...

#include <Effect.h>

Inheritance diagram for ramses::Effect:
[legend]
Collaboration diagram for ramses::Effect:
[legend]

Public Member Functions

uint32_t getUniformInputCount () const
 Gets number of uniform inputs. More...
 
uint32_t getAttributeInputCount () const
 Gets number of attribute inputs. More...
 
status_t getUniformInput (uint32_t index, UniformInput &uniformInput) const
 Gets uniform input at given index. More...
 
status_t getAttributeInput (uint32_t index, AttributeInput &attributeInput) const
 Gets attribute input at given index. More...
 
status_t findUniformInput (const char *inputName, UniformInput &uniformInput) const
 Finds uniform input by input name. More...
 
status_t findAttributeInput (const char *inputName, AttributeInput &attributeInput) const
 Finds attribute input by input name. More...
 
status_t findUniformInput (EEffectUniformSemantic uniformSemantic, UniformInput &uniformInput) const
 Finds uniform input that represents a semantic input (if existing). More...
 
status_t findAttributeInput (EEffectAttributeSemantic attributeSemantic, AttributeInput &attributeInput) const
 Finds attribute input that represents a semantic input (if existing). More...
 
- Public Member Functions inherited from ramses::Resource
resourceId_t getResourceId () const
 Get resource Id. More...
 
- Public Member Functions inherited from ramses::SceneObject
sceneObjectId_t getSceneObjectId () const
 Returns scene object id which is automatically assigned at creation time of object and is unique within scope of one scene. More...
 
sceneId_t getSceneId () const
 Returns sceneid to which this object belongs to. More...
 
- Public Member Functions inherited from ramses::RamsesObject
const char * getName () const
 Returns the name of the object. More...
 
status_t setName (const char *name)
 Changes the name of the object. More...
 
ERamsesObjectType getType () const
 Gets type of the object. More...
 
bool isOfType (ERamsesObjectType type) const
 Checks if the object is of given type. More...
 
- Public Member Functions inherited from ramses::StatusObject
status_t validate () const
 Generates verbose validation of the object. More...
 
const char * getValidationReport (EValidationSeverity minSeverity=EValidationSeverity_Info) const
 Provides verbose report in human readable form generated by validate. More...
 
const char * getStatusMessage (status_t status) const
 Get the string description for a status provided by a RAMSES API function. More...
 
 StatusObject (const StatusObject &other)=delete
 Deleted copy constructor. More...
 
StatusObjectoperator= (const StatusObject &other)=delete
 Deleted copy assignment. More...
 

Static Public Member Functions

static bool hasGeometryShader (const Effect &effect)
 Returns whether the effect has a geometry shader attached to it. More...
 
static status_t getGeometryShaderInputType (const Effect &effect, EDrawMode &expectedGeometryInputType)
 If the effect has a geometry shader attached to it (see hasGeometryShader) this method can be used to check the expected primitive type of the geometry shader. Use this to make sure that geometry-based effects get only paired with geometry which matches their expected type! More...
 

Public Attributes

class EffectImpl & impl
 Stores internal data for implementation specifics of Effect. More...
 
- Public Attributes inherited from ramses::Resource
class ResourceImpl & impl
 
- Public Attributes inherited from ramses::SceneObject
class SceneObjectImpl & impl
 
- Public Attributes inherited from ramses::ClientObject
class ClientObjectImpl & impl
 
- Public Attributes inherited from ramses::RamsesObject
class RamsesObjectImpl & impl
 
- Public Attributes inherited from ramses::StatusObject
class StatusObjectImpl & impl
 

Protected Member Functions

 Effect (EffectImpl &pimpl)
 Constructor of Effect. More...
 
 Effect (const Effect &other)
 Copy constructor of Effect. More...
 
Effectoperator= (const Effect &other)
 Assignment operator of Effect. More...
 
virtual ~Effect ()
 Destructor of the Effect. More...
 
- Protected Member Functions inherited from ramses::Resource
 Resource (ResourceImpl &pimpl)
 Constructor for Resource. More...
 
virtual ~Resource ()
 Destructor for Resource. More...
 
- Protected Member Functions inherited from ramses::SceneObject
 SceneObject (SceneObjectImpl &pimpl)
 Constructor for SceneObject. More...
 
virtual ~SceneObject ()
 Destructor of the SceneObject. More...
 
- Protected Member Functions inherited from ramses::ClientObject
 ClientObject (ClientObjectImpl &pimpl)
 Constructor for ClientObject. More...
 
virtual ~ClientObject ()
 Destructor of the ClientObject. More...
 
- Protected Member Functions inherited from ramses::RamsesObject
 RamsesObject (RamsesObjectImpl &pimpl)
 Constructor for RamsesObject. More...
 
virtual ~RamsesObject ()
 Destructor of the RamsesObject. More...
 
- Protected Member Functions inherited from ramses::StatusObject
 StatusObject (StatusObjectImpl &pimpl)
 Constructor for StatusObject. More...
 
virtual ~StatusObject ()
 Destructor of the StatusObject. More...
 

Friends

class SceneImpl
 Scene is the convenience library for application developers. More...
 

Detailed Description

An effect describes how an object will be rendered to the screen.

Examples
ramses-example-basic-animation-realtime/src/main.cpp, ramses-example-basic-animation/src/main.cpp, ramses-example-basic-blending/src/main.cpp, ramses-example-basic-compositing/src/main.cpp, ramses-example-basic-effect-from-glsl/src/main.cpp, ramses-example-basic-file-loading/src/main.cpp, ramses-example-basic-geometry/src/main.cpp, ramses-example-basic-rendergroups/src/main.cpp, ramses-example-basic-renderpasses/src/main.cpp, ramses-example-basic-rendertarget/src/main.cpp, ramses-example-basic-scenegraph/src/main.cpp, ramses-example-basic-texturing/src/main.cpp, ramses-example-data-buffers-texture/src/main.cpp, ramses-example-data-buffers-vertices/src/main.cpp, ramses-example-dcsm-provider/src/main.cpp, ramses-example-geometry-instancing/src/main.cpp, ramses-example-interleaved-vertex-buffers/src/main.cpp, ramses-example-local-client-dcsm/src/main.cpp, ramses-example-local-client/src/main.cpp, ramses-example-local-datalink/src/main.cpp, ramses-example-local-displays/src/main.cpp, ramses-example-local-dma-offscreenbuffer/src/main.cpp, ramses-example-local-geometry-shaders/src/main.cpp, ramses-example-local-offscreenbuffer/src/main.cpp, ramses-example-local-pick-handling/src/main.cpp, ramses-example-local-scene-referencing/src/main.cpp, ramses-example-local-viewport-link/src/main.cpp, ramses-example-renderonce/src/main.cpp, ramses-example-text-basic/src/main.cpp, and ramses-example-text-languages/src/main.cpp.

Constructor & Destructor Documentation

◆ Effect() [1/2]

ramses::Effect::Effect ( EffectImpl &  pimpl)
explicitprotected

Constructor of Effect.

Parameters
[in]pimplInternal data for implementation specifics of Effect (sink - instance becomes owner)

◆ Effect() [2/2]

ramses::Effect::Effect ( const Effect other)
protected

Copy constructor of Effect.

Parameters
[in]otherOther instance of Effect class

◆ ~Effect()

virtual ramses::Effect::~Effect ( )
protectedvirtual

Destructor of the Effect.

Member Function Documentation

◆ findAttributeInput() [1/2]

status_t ramses::Effect::findAttributeInput ( const char *  inputName,
AttributeInput attributeInput 
) const

Finds attribute input by input name.

Parameters
[in]inputNameName of attribute input to retrieve
[out]attributeInputAttribute input
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().
Examples
ramses-example-basic-animation-realtime/src/main.cpp, ramses-example-basic-animation/src/main.cpp, ramses-example-basic-blending/src/main.cpp, ramses-example-basic-compositing/src/main.cpp, ramses-example-basic-effect-from-glsl/src/main.cpp, ramses-example-basic-file-loading/src/main.cpp, ramses-example-basic-geometry/src/main.cpp, ramses-example-basic-rendergroups/src/main.cpp, ramses-example-basic-renderpasses/src/main.cpp, ramses-example-basic-rendertarget/src/main.cpp, ramses-example-basic-scenegraph/src/main.cpp, ramses-example-basic-texturing/src/main.cpp, ramses-example-data-buffers-texture/src/main.cpp, ramses-example-data-buffers-vertices/src/main.cpp, ramses-example-dcsm-provider/src/main.cpp, ramses-example-geometry-instancing/src/main.cpp, ramses-example-interleaved-vertex-buffers/src/main.cpp, ramses-example-local-client-dcsm/src/main.cpp, ramses-example-local-client/src/main.cpp, ramses-example-local-datalink/src/main.cpp, ramses-example-local-displays/src/main.cpp, ramses-example-local-dma-offscreenbuffer/src/main.cpp, ramses-example-local-geometry-shaders/src/main.cpp, ramses-example-local-offscreenbuffer/src/main.cpp, ramses-example-local-pick-handling/src/main.cpp, ramses-example-local-scene-referencing/src/main.cpp, ramses-example-local-viewport-link/src/main.cpp, and ramses-example-renderonce/src/main.cpp.

◆ findAttributeInput() [2/2]

status_t ramses::Effect::findAttributeInput ( EEffectAttributeSemantic  attributeSemantic,
AttributeInput attributeInput 
) const

Finds attribute input that represents a semantic input (if existing).

Parameters
[in]attributeSemanticSemantic of attribute input to retrieve
[out]attributeInputAttribute input
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().

◆ findUniformInput() [1/2]

status_t ramses::Effect::findUniformInput ( const char *  inputName,
UniformInput uniformInput 
) const

◆ findUniformInput() [2/2]

status_t ramses::Effect::findUniformInput ( EEffectUniformSemantic  uniformSemantic,
UniformInput uniformInput 
) const

Finds uniform input that represents a semantic input (if existing).

Parameters
[in]uniformSemanticSemantic of uniform input to retrieve
[out]uniformInputUniform input
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().

◆ getAttributeInput()

status_t ramses::Effect::getAttributeInput ( uint32_t  index,
AttributeInput attributeInput 
) const

Gets attribute input at given index.

Parameters
[in]indexIndex of attribute input to retrieve
[out]attributeInputAttribute input
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().

◆ getAttributeInputCount()

uint32_t ramses::Effect::getAttributeInputCount ( ) const

Gets number of attribute inputs.

Returns
Number of attribute inputs

◆ getGeometryShaderInputType()

static status_t ramses::Effect::getGeometryShaderInputType ( const Effect effect,
EDrawMode expectedGeometryInputType 
)
static

If the effect has a geometry shader attached to it (see hasGeometryShader) this method can be used to check the expected primitive type of the geometry shader. Use this to make sure that geometry-based effects get only paired with geometry which matches their expected type!

See also ramses::Appearance::setDrawMode().

Parameters
[in]effecteffect to check for geometry input type
[out]expectedGeometryInputTypegeometry type expected by the geometry shader of /p effect
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().

◆ getUniformInput()

status_t ramses::Effect::getUniformInput ( uint32_t  index,
UniformInput uniformInput 
) const

Gets uniform input at given index.

Parameters
[in]indexIndex of uniform input to retrieve
[out]uniformInputUniform input
Returns
StatusOK for success, otherwise the returned status can be used to resolve error message using getStatusMessage().
Examples
ramses-example-local-offscreenbuffer/src/main.cpp.

◆ getUniformInputCount()

uint32_t ramses::Effect::getUniformInputCount ( ) const

Gets number of uniform inputs.

Returns
Number of uniform inputs
Examples
ramses-example-local-offscreenbuffer/src/main.cpp.

◆ hasGeometryShader()

static bool ramses::Effect::hasGeometryShader ( const Effect effect)
static

Returns whether the effect has a geometry shader attached to it.

Parameters
[in]effecteffect to check for existance of geometry shader
Returns
true if the effect has a geometry shader attached to it, false otherwise

◆ operator=()

Effect& ramses::Effect::operator= ( const Effect other)
protected

Assignment operator of Effect.

Parameters
[in]otherOther instance of Effect class
Returns
This instance after assignment

Friends And Related Function Documentation

◆ SceneImpl

friend class SceneImpl
friend

Scene is the convenience library for application developers.

Member Data Documentation

◆ impl

class EffectImpl& ramses::Effect::impl

Stores internal data for implementation specifics of Effect.


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