![]() |
RAMSES Documentation
27.0.130
Information for RAMSES users and developers
|
The Appearance describes how an object should look like. This includes GLSL uniform values, and GPU states such as blending, buffer configurations, masks etc. The API to set uniform values is aligned to the glUniformX API of OpenGL. Beware that boolean values are reported and handled as int (0 is false, anything else is true) - similar to OpenGL conventions. More...
#include <Appearance.h>
Public Member Functions | |
status_t | setBlendingFactors (EBlendFactor srcColor, EBlendFactor destColor, EBlendFactor srcAlpha, EBlendFactor destAlpha) |
Sets blending factors for source/destination color/alpha. Blending operations need to be set as well in order to enable blending. More... | |
status_t | getBlendingFactors (EBlendFactor &srcColor, EBlendFactor &destColor, EBlendFactor &srcAlpha, EBlendFactor &destAlpha) const |
Gets blending factors for source/destination color/alpha. More... | |
status_t | setBlendingOperations (EBlendOperation operationColor, EBlendOperation operationAlpha) |
Sets blending operation for color and alpha. Blending factors need to be set as well in order to enable blending. More... | |
status_t | getBlendingOperations (EBlendOperation &operationColor, EBlendOperation &operationAlpha) const |
Gets blending operation for color and alpha. More... | |
status_t | setBlendingColor (float red, float green, float blue, float alpha) |
Sets blending color that can be used as blending color constant for some blending factors. The default value is (0,0,0,0) More... | |
status_t | getBlendingColor (float &red, float &green, float &blue, float &alpha) const |
Gets blending color set via setBlendingColor. More... | |
status_t | setDepthWrite (EDepthWrite mode) |
Enables or disables writing to depth buffer. More... | |
status_t | getDepthWriteMode (EDepthWrite &mode) const |
Gets the current state of writing to depth buffer. More... | |
status_t | setDepthFunction (EDepthFunc func) |
Sets depth comparison function. Depth writing has to be enabled in order for this to have any effect. Default depth comparison function is less or equal. More... | |
status_t | getDepthFunction (EDepthFunc &func) const |
Gets depth comparison function. More... | |
status_t | setScissorTest (EScissorTest state, int16_t x, int16_t y, uint16_t width, uint16_t height) |
Enables or disables scissor test and sets region for scissor test. More... | |
status_t | getScissorTestState (EScissorTest &state) const |
Gets the current state of scissor test. More... | |
status_t | getScissorRegion (int16_t &x, int16_t &y, uint16_t &width, uint16_t &height) const |
Gets region for scissor test. More... | |
status_t | setStencilFunction (EStencilFunc func, uint8_t ref, uint8_t mask) |
Sets stencil function, reference and mask value for stencil testing. Stencil is disabled by default. More... | |
status_t | getStencilFunction (EStencilFunc &func, uint8_t &ref, uint8_t &mask) const |
Gets stencil function, reference and mask value. More... | |
status_t | setStencilOperation (EStencilOperation sfail, EStencilOperation dpfail, EStencilOperation dppass) |
Sets stencil operations for stencil testing. Default stencil operation values are keep. More... | |
status_t | getStencilOperation (EStencilOperation &sfail, EStencilOperation &dpfail, EStencilOperation &dppass) const |
Gets stencil operations. More... | |
status_t | setCullingMode (ECullMode mode) |
Sets the culling mode indicating which side of mesh will be removed before rasterization. Default culling mode is BackFaceCulling. More... | |
status_t | setDrawMode (EDrawMode mode) |
Sets the draw mode indicating by which primitive the mesh will be rendered Default draw mode is Triangles. More... | |
status_t | getCullingMode (ECullMode &mode) const |
Gets the culling mode indicating which side of mesh will be removed before rasterization. More... | |
status_t | getDrawMode (EDrawMode &mode) const |
Gets the draw mode indicating by which primitive the mesh will be rendered. More... | |
status_t | setColorWriteMask (bool writeRed, bool writeGreen, bool writeBlue, bool writeAlpha) |
Sets color write mask. If needed certain color channels can stay untouched using the color write mask. By default writing to all color channels is enabled. More... | |
status_t | getColorWriteMask (bool &writeRed, bool &writeGreen, bool &writeBlue, bool &writeAlpha) const |
Gets color write mask. More... | |
status_t | setInputValueInt32 (const UniformInput &input, int32_t i) |
Sets value of the input. More... | |
status_t | setInputValueInt32 (const UniformInput &input, uint32_t elementCount, const int32_t *values) |
Sets values of the input elements. More... | |
status_t | getInputValueInt32 (const UniformInput &input, int32_t &i) const |
Gets the value of the input. More... | |
status_t | getInputValueInt32 (const UniformInput &input, uint32_t elementCount, int32_t *valuesOut) const |
Gets current values of the input. More... | |
status_t | setInputValueFloat (const UniformInput &input, float value) |
Sets value of the input. More... | |
status_t | setInputValueFloat (const UniformInput &input, uint32_t elementCount, const float *values) |
Sets values of the input elements. More... | |
status_t | getInputValueFloat (const UniformInput &input, float &valueOut) const |
Gets the value of the input. More... | |
status_t | getInputValueFloat (const UniformInput &input, uint32_t elementCount, float *valuesOut) const |
Gets current values of the input. More... | |
status_t | setInputValueVector2i (const UniformInput &input, int32_t x, int32_t y) |
Sets value of the input. More... | |
status_t | setInputValueVector2i (const UniformInput &input, uint32_t elementCount, const int32_t *values) |
Sets values of the input elements. More... | |
status_t | getInputValueVector2i (const UniformInput &input, int32_t &x, int32_t &y) const |
Gets the value of the input. More... | |
status_t | getInputValueVector2i (const UniformInput &input, uint32_t elementCount, int32_t *valuesOut) const |
Gets current values of the input. More... | |
status_t | setInputValueVector3i (const UniformInput &input, int32_t x, int32_t y, int32_t z) |
Sets value of the input. More... | |
status_t | setInputValueVector3i (const UniformInput &input, uint32_t elementCount, const int32_t *values) |
Sets values of the input elements. More... | |
status_t | getInputValueVector3i (const UniformInput &input, int32_t &x, int32_t &y, int32_t &z) const |
Gets the value of the input. More... | |
status_t | getInputValueVector3i (const UniformInput &input, uint32_t elementCount, int32_t *valuesOut) const |
Gets current values of the input. More... | |
status_t | setInputValueVector4i (const UniformInput &input, int32_t x, int32_t y, int32_t z, int32_t w) |
Sets value of the input. More... | |
status_t | setInputValueVector4i (const UniformInput &input, uint32_t elementCount, const int32_t *values) |
Sets values of the input elements. More... | |
status_t | getInputValueVector4i (const UniformInput &input, int32_t &x, int32_t &y, int32_t &z, int32_t &w) const |
Gets the value of the input. More... | |
status_t | getInputValueVector4i (const UniformInput &input, uint32_t elementCount, int32_t *valuesOut) const |
Gets current values of the input. More... | |
status_t | setInputValueVector2f (const UniformInput &input, float x, float y) |
Sets value of the input. More... | |
status_t | setInputValueVector2f (const UniformInput &input, uint32_t elementCount, const float *values) |
Sets values of the input elements. More... | |
status_t | getInputValueVector2f (const UniformInput &input, float &x, float &y) const |
Gets the value of the input. More... | |
status_t | getInputValueVector2f (const UniformInput &input, uint32_t elementCount, float *valuesOut) const |
Gets current values of the input. More... | |
status_t | setInputValueVector3f (const UniformInput &input, float x, float y, float z) |
Sets value of the input. More... | |
status_t | setInputValueVector3f (const UniformInput &input, uint32_t elementCount, const float *values) |
Sets values of the input elements. More... | |
status_t | getInputValueVector3f (const UniformInput &input, float &x, float &y, float &z) const |
Gets the value of the input. More... | |
status_t | getInputValueVector3f (const UniformInput &input, uint32_t elementCount, float *valuesOut) const |
Gets current values of the input. More... | |
status_t | setInputValueVector4f (const UniformInput &input, float x, float y, float z, float w) |
Sets value of the input. More... | |
status_t | setInputValueVector4f (const UniformInput &input, uint32_t elementCount, const float *values) |
Sets values of the input elements. More... | |
status_t | getInputValueVector4f (const UniformInput &input, float &x, float &y, float &z, float &w) const |
Gets the value of the input. More... | |
status_t | getInputValueVector4f (const UniformInput &input, uint32_t elementCount, float *valuesOut) const |
Gets current values of the input. More... | |
status_t | setInputValueMatrix22f (const UniformInput &input, const float values[4]) |
Sets value of the input. More... | |
status_t | setInputValueMatrix22f (const UniformInput &input, uint32_t elementCount, const float *values) |
Sets values of the input elements. More... | |
status_t | getInputValueMatrix22f (const UniformInput &input, float valueOut[4]) const |
Gets the value of the input. More... | |
status_t | getInputValueMatrix22f (const UniformInput &input, uint32_t elementCount, float *valuesOut) const |
Gets current values of the input. More... | |
status_t | setInputValueMatrix33f (const UniformInput &input, const float values[9]) |
Sets value of the input. More... | |
status_t | setInputValueMatrix33f (const UniformInput &input, uint32_t elementCount, const float *values) |
Sets values of the input elements. More... | |
status_t | getInputValueMatrix33f (const UniformInput &input, float valueOut[9]) const |
Gets the value of the input. More... | |
status_t | getInputValueMatrix33f (const UniformInput &input, uint32_t elementCount, float *valuesOut) const |
Gets current values of the input. More... | |
status_t | setInputValueMatrix44f (const UniformInput &input, const float values[16]) |
Sets value of the input. More... | |
status_t | setInputValueMatrix44f (const UniformInput &input, uint32_t elementCount, const float *values) |
Sets values of the input elements. More... | |
status_t | getInputValueMatrix44f (const UniformInput &input, float valueOut[16]) const |
Gets the value of the input. More... | |
status_t | getInputValueMatrix44f (const UniformInput &input, uint32_t elementCount, float *valuesOut) const |
Gets current values of the input. More... | |
status_t | setInputTexture (const UniformInput &input, const TextureSampler &textureSampler) |
Sets texture sampler to the input. More... | |
status_t | setInputTexture (const UniformInput &input, const TextureSamplerMS &textureSampler) |
Sets multisampled texture sampler to the input. More... | |
status_t | setInputTexture (const UniformInput &input, const TextureSamplerExternal &textureSampler) |
Sets external texture sampler to the input. More... | |
status_t | getInputTexture (const UniformInput &input, const TextureSampler *&textureSampler) const |
Gets texture sampler currently set to the input. More... | |
status_t | getInputTextureMS (const UniformInput &input, const TextureSamplerMS *&textureSampler) const |
Gets texture sampler currently set to the input. More... | |
status_t | getInputTextureExternal (const UniformInput &input, const TextureSamplerExternal *&textureSampler) const |
Gets texture sampler currently set to the input. More... | |
status_t | bindInput (const UniformInput &input, const DataObject &dataObject) |
Bind a DataObject to the Appearance's uniform input. The value from the DataObject will be used and any change made on the DataObject will be reflected in the Appearance. One DataObject can be bound to multiple Appearances. The data type of the DataObject must match the uniform input data type otherwise the call will fail and report error. DataObject cannot be bound to an input with semantics, texture input or array input. Once a DataObject is bound to an input the value cannot be set or get using set/getInputValue* () anymore. Binding a DataObject to an already bound input will unbind the old one and bind the new one. More... | |
status_t | unbindInput (const UniformInput &input) |
Unbind a previously bound DataObject from the Appearance's uniform input. Any previously set value that was set before binding will now be used. Appropriate set/getInputValue* () method must be used to set or get the value or another DataObject can be bound. More... | |
bool | isInputBound (const UniformInput &input) const |
Check whether a uniform input has any DataObject bound to it. More... | |
const DataObject * | getDataObjectBoundToInput (const UniformInput &input) const |
Gets the data object bound to a uniform input. More... | |
const Effect & | getEffect () const |
Gets the effect used to create this appearance. More... | |
![]() | |
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... | |
![]() | |
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... | |
![]() | |
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... | |
StatusObject & | operator= (const StatusObject &other)=delete |
Deleted copy assignment. More... | |
Public Attributes | |
class AppearanceImpl & | impl |
![]() | |
class SceneObjectImpl & | impl |
![]() | |
class ClientObjectImpl & | impl |
![]() | |
class RamsesObjectImpl & | impl |
![]() | |
class StatusObjectImpl & | impl |
Protected Member Functions | |
Appearance (AppearanceImpl &pimpl) | |
Constructor of Appearance. More... | |
Appearance (const Appearance &other) | |
Copy constructor of Appearance. More... | |
Appearance & | operator= (const Appearance &other) |
Assignment operator of Appearance. More... | |
virtual | ~Appearance () |
Destructor of the Appearance. More... | |
![]() | |
SceneObject (SceneObjectImpl &pimpl) | |
Constructor for SceneObject. More... | |
virtual | ~SceneObject () |
Destructor of the SceneObject. More... | |
![]() | |
ClientObject (ClientObjectImpl &pimpl) | |
Constructor for ClientObject. More... | |
virtual | ~ClientObject () |
Destructor of the ClientObject. More... | |
![]() | |
RamsesObject (RamsesObjectImpl &pimpl) | |
Constructor for RamsesObject. More... | |
virtual | ~RamsesObject () |
Destructor of the RamsesObject. More... | |
![]() | |
StatusObject (StatusObjectImpl &pimpl) | |
Constructor for StatusObject. More... | |
virtual | ~StatusObject () |
Destructor of the StatusObject. More... | |
Friends | |
class | SceneImpl |
Scene is the factory for creating Appearance instances. More... | |
The Appearance describes how an object should look like. This includes GLSL uniform values, and GPU states such as blending, buffer configurations, masks etc. The API to set uniform values is aligned to the glUniformX API of OpenGL. Beware that boolean values are reported and handled as int (0 is false, anything else is true) - similar to OpenGL conventions.
It provides mechanisms for creating effects
|
explicitprotected |
Constructor of Appearance.
[in] | pimpl | Internal data for implementation specifics of Appearance (sink - instance becomes owner) |
|
protected |
Copy constructor of Appearance.
[in] | other | Other instance of appearance class |
|
protectedvirtual |
Destructor of the Appearance.
status_t ramses::Appearance::bindInput | ( | const UniformInput & | input, |
const DataObject & | dataObject | ||
) |
Bind a DataObject to the Appearance's uniform input. The value from the DataObject will be used and any change made on the DataObject will be reflected in the Appearance. One DataObject can be bound to multiple Appearances. The data type of the DataObject must match the uniform input data type otherwise the call will fail and report error. DataObject cannot be bound to an input with semantics, texture input or array input. Once a DataObject is bound to an input the value cannot be set or get using set/getInputValue*
() anymore. Binding a DataObject to an already bound input will unbind the old one and bind the new one.
[in] | input | The effect uniform input to bind the DataObject to |
[in] | dataObject | The DataObject to be bound |
status_t ramses::Appearance::getBlendingColor | ( | float & | red, |
float & | green, | ||
float & | blue, | ||
float & | alpha | ||
) | const |
Gets blending color set via setBlendingColor.
[out] | red | Red channel in blending color |
[out] | green | Green channel in blending color |
[out] | blue | Blue channel in blending color |
[out] | alpha | Alpha channel in blending color |
status_t ramses::Appearance::getBlendingFactors | ( | EBlendFactor & | srcColor, |
EBlendFactor & | destColor, | ||
EBlendFactor & | srcAlpha, | ||
EBlendFactor & | destAlpha | ||
) | const |
Gets blending factors for source/destination color/alpha.
[out] | srcColor | Source color blending factor |
[out] | destColor | Destination color blending factor |
[out] | srcAlpha | Source alpha blending factor |
[out] | destAlpha | Destination alpha blending factor |
status_t ramses::Appearance::getBlendingOperations | ( | EBlendOperation & | operationColor, |
EBlendOperation & | operationAlpha | ||
) | const |
Gets blending operation for color and alpha.
[out] | operationColor | Blending operation for color |
[out] | operationAlpha | Blending operation for alpha |
status_t ramses::Appearance::getColorWriteMask | ( | bool & | writeRed, |
bool & | writeGreen, | ||
bool & | writeBlue, | ||
bool & | writeAlpha | ||
) | const |
Gets color write mask.
[out] | writeRed | Enable/disable flag for red channel |
[out] | writeGreen | Enable/disable flag for green channel |
[out] | writeBlue | Enable/disable flag for blue channel |
[out] | writeAlpha | Enable/disable flag for alpha channel |
Gets the culling mode indicating which side of mesh will be removed before rasterization.
[out] | mode | Culling mode to be used. |
const DataObject* ramses::Appearance::getDataObjectBoundToInput | ( | const UniformInput & | input | ) | const |
Gets the data object bound to a uniform input.
[in] | input | The effect uniform input to get the bound data object for |
The
data object bound the uniform input if existing, otherwise returns nullptr status_t ramses::Appearance::getDepthFunction | ( | EDepthFunc & | func | ) | const |
Gets depth comparison function.
[out] | func | Depth comparison function to be used |
status_t ramses::Appearance::getDepthWriteMode | ( | EDepthWrite & | mode | ) | const |
Gets the current state of writing to depth buffer.
[out] | mode | Depth write mode |
Gets the draw mode indicating by which primitive the mesh will be rendered.
[out] | mode | draw mode to be used. |
const Effect& ramses::Appearance::getEffect | ( | ) | const |
Gets the effect used to create this appearance.
status_t ramses::Appearance::getInputTexture | ( | const UniformInput & | input, |
const TextureSampler *& | textureSampler | ||
) | const |
Gets texture sampler currently set to the input.
[in] | input | The effect uniform input |
[out] | textureSampler | Will set texture sampler pointer to the TextureSampler object set to the uniform input, nullptr if none set or there was an error |
status_t ramses::Appearance::getInputTextureExternal | ( | const UniformInput & | input, |
const TextureSamplerExternal *& | textureSampler | ||
) | const |
Gets texture sampler currently set to the input.
[in] | input | The effect uniform input |
[out] | textureSampler | Will set texture sampler pointer to the TextureSamplerExternal object set to the uniform input, nullptr if none set or there was an error |
status_t ramses::Appearance::getInputTextureMS | ( | const UniformInput & | input, |
const TextureSamplerMS *& | textureSampler | ||
) | const |
Gets texture sampler currently set to the input.
[in] | input | The effect uniform input |
[out] | textureSampler | Will set texture sampler pointer to the TextureSamplerMS object set to the uniform input, nullptr if none set or there was an error |
status_t ramses::Appearance::getInputValueFloat | ( | const UniformInput & | input, |
float & | valueOut | ||
) | const |
Gets the value of the input.
[in] | input | The effect uniform input |
[out] | valueOut | The float value |
status_t ramses::Appearance::getInputValueFloat | ( | const UniformInput & | input, |
uint32_t | elementCount, | ||
float * | valuesOut | ||
) | const |
Gets current values of the input.
[in] | input | The effect uniform input |
[in] | elementCount | the number of values that are copied to valuesOut. Must match UniformInput::getElementCount() |
[out] | valuesOut | location where the values are copied to |
status_t ramses::Appearance::getInputValueInt32 | ( | const UniformInput & | input, |
int32_t & | i | ||
) | const |
Gets the value of the input.
[in] | input | The effect uniform input |
[out] | i | The signed int 32-bit value |
status_t ramses::Appearance::getInputValueInt32 | ( | const UniformInput & | input, |
uint32_t | elementCount, | ||
int32_t * | valuesOut | ||
) | const |
Gets current values of the input.
[in] | input | The effect uniform input |
[in] | elementCount | the number of values that are copied to valuesOut. Must match UniformInput::getElementCount() |
[out] | valuesOut | location where the values are copied to |
status_t ramses::Appearance::getInputValueMatrix22f | ( | const UniformInput & | input, |
float | valueOut[4] | ||
) | const |
Gets the value of the input.
[in] | input | The effect uniform input |
[out] | valueOut | The matrix 2x2 value (column-wise) |
status_t ramses::Appearance::getInputValueMatrix22f | ( | const UniformInput & | input, |
uint32_t | elementCount, | ||
float * | valuesOut | ||
) | const |
Gets current values of the input.
[in] | input | The effect uniform input |
[in] | elementCount | the number of values that are copied to valuesOut. Must match UniformInput::getElementCount() |
[out] | valuesOut | location where the values (column-wise) are copied to |
status_t ramses::Appearance::getInputValueMatrix33f | ( | const UniformInput & | input, |
float | valueOut[9] | ||
) | const |
Gets the value of the input.
[in] | input | The effect uniform input |
[out] | valueOut | The matrix 3x3 value (column-wise) |
status_t ramses::Appearance::getInputValueMatrix33f | ( | const UniformInput & | input, |
uint32_t | elementCount, | ||
float * | valuesOut | ||
) | const |
Gets current values of the input.
[in] | input | The effect uniform input |
[in] | elementCount | the number of values that are copied to valuesOut. Must match UniformInput::getElementCount() |
[out] | valuesOut | location where the values (column-wise) are copied to |
status_t ramses::Appearance::getInputValueMatrix44f | ( | const UniformInput & | input, |
float | valueOut[16] | ||
) | const |
Gets the value of the input.
[in] | input | The effect uniform input |
[out] | valueOut | The matrix 4x4 value (column-wise) |
status_t ramses::Appearance::getInputValueMatrix44f | ( | const UniformInput & | input, |
uint32_t | elementCount, | ||
float * | valuesOut | ||
) | const |
Gets current values of the input.
[in] | input | The effect uniform input |
[in] | elementCount | the number of values that are copied to valuesOut. Must match UniformInput::getElementCount() |
[out] | valuesOut | location where the values (column-wise) are copied to |
status_t ramses::Appearance::getInputValueVector2f | ( | const UniformInput & | input, |
float & | x, | ||
float & | y | ||
) | const |
Gets the value of the input.
[in] | input | The effect uniform input |
[out] | x | The X component value |
[out] | y | The Y component value |
status_t ramses::Appearance::getInputValueVector2f | ( | const UniformInput & | input, |
uint32_t | elementCount, | ||
float * | valuesOut | ||
) | const |
Gets current values of the input.
[in] | input | The effect uniform input |
[in] | elementCount | the number of values that are copied to valuesOut. Must match UniformInput::getElementCount() |
[out] | valuesOut | location where the values are copied to |
status_t ramses::Appearance::getInputValueVector2i | ( | const UniformInput & | input, |
int32_t & | x, | ||
int32_t & | y | ||
) | const |
Gets the value of the input.
[in] | input | The effect uniform input |
[out] | x | The X component value |
[out] | y | The Y component value |
status_t ramses::Appearance::getInputValueVector2i | ( | const UniformInput & | input, |
uint32_t | elementCount, | ||
int32_t * | valuesOut | ||
) | const |
Gets current values of the input.
[in] | input | The effect uniform input |
[in] | elementCount | the number of values that are copied to valuesOut. Must match UniformInput::getElementCount() |
[out] | valuesOut | location where the values are copied to |
status_t ramses::Appearance::getInputValueVector3f | ( | const UniformInput & | input, |
float & | x, | ||
float & | y, | ||
float & | z | ||
) | const |
Gets the value of the input.
[in] | input | The effect uniform input |
[out] | x | The X component value |
[out] | y | The Y component value |
[out] | z | The Z component value |
status_t ramses::Appearance::getInputValueVector3f | ( | const UniformInput & | input, |
uint32_t | elementCount, | ||
float * | valuesOut | ||
) | const |
Gets current values of the input.
[in] | input | The effect uniform input |
[in] | elementCount | the number of values that are copied to valuesOut. Must match UniformInput::getElementCount() |
[out] | valuesOut | location where the values are copied to |
status_t ramses::Appearance::getInputValueVector3i | ( | const UniformInput & | input, |
int32_t & | x, | ||
int32_t & | y, | ||
int32_t & | z | ||
) | const |
Gets the value of the input.
[in] | input | The effect uniform input |
[out] | x | The X component value |
[out] | y | The Y component value |
[out] | z | The Z component value |
status_t ramses::Appearance::getInputValueVector3i | ( | const UniformInput & | input, |
uint32_t | elementCount, | ||
int32_t * | valuesOut | ||
) | const |
Gets current values of the input.
[in] | input | The effect uniform input |
[in] | elementCount | the number of values that are copied to valuesOut. Must match UniformInput::getElementCount() |
[out] | valuesOut | location where the values are copied to |
status_t ramses::Appearance::getInputValueVector4f | ( | const UniformInput & | input, |
float & | x, | ||
float & | y, | ||
float & | z, | ||
float & | w | ||
) | const |
Gets the value of the input.
[in] | input | The effect uniform input |
[out] | x | The X component value |
[out] | y | The Y component value |
[out] | z | The Z component value |
[out] | w | The W component value |
status_t ramses::Appearance::getInputValueVector4f | ( | const UniformInput & | input, |
uint32_t | elementCount, | ||
float * | valuesOut | ||
) | const |
Gets current values of the input.
[in] | input | The effect uniform input |
[in] | elementCount | the number of values that are copied to valuesOut. Must match UniformInput::getElementCount() |
[out] | valuesOut | location where the values are copied to |
status_t ramses::Appearance::getInputValueVector4i | ( | const UniformInput & | input, |
int32_t & | x, | ||
int32_t & | y, | ||
int32_t & | z, | ||
int32_t & | w | ||
) | const |
Gets the value of the input.
[in] | input | The effect uniform input |
[out] | x | The X component value |
[out] | y | The Y component value |
[out] | z | The Z component value |
[out] | w | The W component value |
status_t ramses::Appearance::getInputValueVector4i | ( | const UniformInput & | input, |
uint32_t | elementCount, | ||
int32_t * | valuesOut | ||
) | const |
Gets current values of the input.
[in] | input | The effect uniform input |
[in] | elementCount | the number of values that are copied to valuesOut. Must match UniformInput::getElementCount() |
[out] | valuesOut | location where the values are copied to |
status_t ramses::Appearance::getScissorRegion | ( | int16_t & | x, |
int16_t & | y, | ||
uint16_t & | width, | ||
uint16_t & | height | ||
) | const |
Gets region for scissor test.
[out] | x | Offset of scissor region on x-axis. |
[out] | y | Offset of scissor region on y-axis. |
[out] | width | Width of scissor region. |
[out] | height | Height of scissor region. |
status_t ramses::Appearance::getScissorTestState | ( | EScissorTest & | state | ) | const |
Gets the current state of scissor test.
[out] | state | State of scissor test |
status_t ramses::Appearance::getStencilFunction | ( | EStencilFunc & | func, |
uint8_t & | ref, | ||
uint8_t & | mask | ||
) | const |
Gets stencil function, reference and mask value.
[out] | func | Stencil function currently set |
[out] | ref | Stencil reference value currently set |
[out] | mask | Stencil mask value currently set |
status_t ramses::Appearance::getStencilOperation | ( | EStencilOperation & | sfail, |
EStencilOperation & | dpfail, | ||
EStencilOperation & | dppass | ||
) | const |
Gets stencil operations.
[out] | sfail | Stencil operation when stencil test fails |
[out] | dpfail | Stencil operation when the stencil test passes, but the depth test fails |
[out] | dppass | Stencil operation when both the stencil test and the depth test pass |
bool ramses::Appearance::isInputBound | ( | const UniformInput & | input | ) | const |
Check whether a uniform input has any DataObject bound to it.
[in] | input | The effect uniform input to check |
true
if there is any DataObject bound to the input, false otherwise
|
protected |
Assignment operator of Appearance.
[in] | other | Other instance of appearance class |
status_t ramses::Appearance::setBlendingColor | ( | float | red, |
float | green, | ||
float | blue, | ||
float | alpha | ||
) |
Sets blending color that can be used as blending color constant for some blending factors. The default value is (0,0,0,0)
[in] | red | Red channel in blending color |
[in] | green | Green channel in blending color |
[in] | blue | Blue channel in blending color |
[in] | alpha | Alpha channel in blending color |
status_t ramses::Appearance::setBlendingFactors | ( | EBlendFactor | srcColor, |
EBlendFactor | destColor, | ||
EBlendFactor | srcAlpha, | ||
EBlendFactor | destAlpha | ||
) |
Sets blending factors for source/destination color/alpha. Blending operations need to be set as well in order to enable blending.
[in] | srcColor | Source color blending factor |
[in] | destColor | Destination color blending factor |
[in] | srcAlpha | Source alpha blending factor |
[in] | destAlpha | Destination alpha blending factor |
status_t ramses::Appearance::setBlendingOperations | ( | EBlendOperation | operationColor, |
EBlendOperation | operationAlpha | ||
) |
Sets blending operation for color and alpha. Blending factors need to be set as well in order to enable blending.
[in] | operationColor | Blending operation for color |
[in] | operationAlpha | Blending operation for alpha |
status_t ramses::Appearance::setColorWriteMask | ( | bool | writeRed, |
bool | writeGreen, | ||
bool | writeBlue, | ||
bool | writeAlpha | ||
) |
Sets color write mask. If needed certain color channels can stay untouched using the color write mask. By default writing to all color channels is enabled.
[in] | writeRed | Enable/disable flag for red channel |
[in] | writeGreen | Enable/disable flag for green channel |
[in] | writeBlue | Enable/disable flag for blue channel |
[in] | writeAlpha | Enable/disable flag for alpha channel |
Sets the culling mode indicating which side of mesh will be removed before rasterization. Default culling mode is BackFaceCulling.
[in] | mode | Culling mode to be used. |
status_t ramses::Appearance::setDepthFunction | ( | EDepthFunc | func | ) |
Sets depth comparison function. Depth writing has to be enabled in order for this to have any effect. Default depth comparison function is less or equal.
[in] | func | Depth comparison function to be used |
status_t ramses::Appearance::setDepthWrite | ( | EDepthWrite | mode | ) |
Enables or disables writing to depth buffer.
[in] | mode | Flag denoting enabling or disabling depth writes. |
Sets the draw mode indicating by which primitive the mesh will be rendered Default draw mode is Triangles.
[in] | mode | Draw mode to be used. |
status_t ramses::Appearance::setInputTexture | ( | const UniformInput & | input, |
const TextureSampler & | textureSampler | ||
) |
Sets texture sampler to the input.
[in] | input | The effect uniform input to set the value to |
[in] | textureSampler | The texture sampler |
status_t ramses::Appearance::setInputTexture | ( | const UniformInput & | input, |
const TextureSamplerExternal & | textureSampler | ||
) |
Sets external texture sampler to the input.
[in] | input | The external texture sampler uniform input to set the value to |
[in] | textureSampler | The external texture sampler |
status_t ramses::Appearance::setInputTexture | ( | const UniformInput & | input, |
const TextureSamplerMS & | textureSampler | ||
) |
Sets multisampled texture sampler to the input.
[in] | input | The multisampled texture sampler uniform input to set the value to |
[in] | textureSampler | The multisampled texture sampler |
status_t ramses::Appearance::setInputValueFloat | ( | const UniformInput & | input, |
float | value | ||
) |
Sets value of the input.
[in] | input | The effect uniform input to set the value to |
[in] | value | The float value |
status_t ramses::Appearance::setInputValueFloat | ( | const UniformInput & | input, |
uint32_t | elementCount, | ||
const float * | values | ||
) |
Sets values of the input elements.
[in] | input | The effect uniform input to set the value to |
[in] | elementCount | The number of values that are used from values. Must match UniformInput::getElementCount() |
[in] | values | Pointer the the values |
status_t ramses::Appearance::setInputValueInt32 | ( | const UniformInput & | input, |
int32_t | i | ||
) |
Sets value of the input.
[in] | input | The effect uniform input to set the value to |
[in] | i | The integer 32bit value |
status_t ramses::Appearance::setInputValueInt32 | ( | const UniformInput & | input, |
uint32_t | elementCount, | ||
const int32_t * | values | ||
) |
Sets values of the input elements.
[in] | input | The effect uniform input to set the value to |
[in] | elementCount | The number of values that are used from values. Must match UniformInput::getElementCount() |
[in] | values | Pointer the the values |
status_t ramses::Appearance::setInputValueMatrix22f | ( | const UniformInput & | input, |
const float | values[4] | ||
) |
Sets value of the input.
[in] | input | The effect uniform input to set the value to |
[in] | values | The matrix 2x2 value (column-wise) |
status_t ramses::Appearance::setInputValueMatrix22f | ( | const UniformInput & | input, |
uint32_t | elementCount, | ||
const float * | values | ||
) |
Sets values of the input elements.
[in] | input | The effect uniform input to set the value to |
[in] | elementCount | The number of values that are used from values. Must match UniformInput::getElementCount() |
[in] | values | Pointer the the values (will be stored column-wise) |
status_t ramses::Appearance::setInputValueMatrix33f | ( | const UniformInput & | input, |
const float | values[9] | ||
) |
Sets value of the input.
[in] | input | The effect uniform input to set the value to |
[in] | values | The matrix 3x3 value (column-wise) |
status_t ramses::Appearance::setInputValueMatrix33f | ( | const UniformInput & | input, |
uint32_t | elementCount, | ||
const float * | values | ||
) |
Sets values of the input elements.
[in] | input | The effect uniform input to set the value to |
[in] | elementCount | The number of values that are used from values. Must match UniformInput::getElementCount() |
[in] | values | Pointer the the values (will be stored column-wise) |
status_t ramses::Appearance::setInputValueMatrix44f | ( | const UniformInput & | input, |
const float | values[16] | ||
) |
Sets value of the input.
[in] | input | The effect uniform input to set the value to |
[in] | values | The matrix 4x4 value (column-wise) |
status_t ramses::Appearance::setInputValueMatrix44f | ( | const UniformInput & | input, |
uint32_t | elementCount, | ||
const float * | values | ||
) |
Sets values of the input elements.
[in] | input | The effect uniform input to set the value to |
[in] | elementCount | The number of values that are used from values. Must match UniformInput::getElementCount() |
[in] | values | Pointer the the values (will be stored column-wise) |
status_t ramses::Appearance::setInputValueVector2f | ( | const UniformInput & | input, |
float | x, | ||
float | y | ||
) |
Sets value of the input.
[in] | input | The effect uniform input to set the value to |
[in] | x | The X component value |
[in] | y | The Y component value |
status_t ramses::Appearance::setInputValueVector2f | ( | const UniformInput & | input, |
uint32_t | elementCount, | ||
const float * | values | ||
) |
Sets values of the input elements.
[in] | input | The effect uniform input to set the value to |
[in] | elementCount | The number of values that are used from values. Must match UniformInput::getElementCount() |
[in] | values | Pointer the the values |
status_t ramses::Appearance::setInputValueVector2i | ( | const UniformInput & | input, |
int32_t | x, | ||
int32_t | y | ||
) |
Sets value of the input.
[in] | input | The effect uniform input to set the value to |
[in] | x | The X component value |
[in] | y | The Y component value |
status_t ramses::Appearance::setInputValueVector2i | ( | const UniformInput & | input, |
uint32_t | elementCount, | ||
const int32_t * | values | ||
) |
Sets values of the input elements.
[in] | input | The effect uniform input to set the value to |
[in] | elementCount | The number of values that are used from values. Must match UniformInput::getElementCount() |
[in] | values | Pointer the the values |
status_t ramses::Appearance::setInputValueVector3f | ( | const UniformInput & | input, |
float | x, | ||
float | y, | ||
float | z | ||
) |
Sets value of the input.
[in] | input | The effect uniform input to set the value to |
[in] | x | The X component value |
[in] | y | The Y component value |
[in] | z | The Z component value |
status_t ramses::Appearance::setInputValueVector3f | ( | const UniformInput & | input, |
uint32_t | elementCount, | ||
const float * | values | ||
) |
Sets values of the input elements.
[in] | input | The effect uniform input to set the value to |
[in] | elementCount | The number of values that are used from values. Must match UniformInput::getElementCount() |
[in] | values | Pointer the the values |
status_t ramses::Appearance::setInputValueVector3i | ( | const UniformInput & | input, |
int32_t | x, | ||
int32_t | y, | ||
int32_t | z | ||
) |
Sets value of the input.
[in] | input | The effect uniform input to set the value to |
[in] | x | The X component value |
[in] | y | The Y component value |
[in] | z | The Z component value |
status_t ramses::Appearance::setInputValueVector3i | ( | const UniformInput & | input, |
uint32_t | elementCount, | ||
const int32_t * | values | ||
) |
Sets values of the input elements.
[in] | input | The effect uniform input to set the value to |
[in] | elementCount | The number of values that are used from values. Must match UniformInput::getElementCount() |
[in] | values | Pointer the the values |
status_t ramses::Appearance::setInputValueVector4f | ( | const UniformInput & | input, |
float | x, | ||
float | y, | ||
float | z, | ||
float | w | ||
) |
Sets value of the input.
[in] | input | The effect uniform input to set the value to |
[in] | x | The X component value |
[in] | y | The Y component value |
[in] | z | The Z component value |
[in] | w | The W component value |
status_t ramses::Appearance::setInputValueVector4f | ( | const UniformInput & | input, |
uint32_t | elementCount, | ||
const float * | values | ||
) |
Sets values of the input elements.
[in] | input | The effect uniform input to set the value to |
[in] | elementCount | The number of values that are used from values. Must match UniformInput::getElementCount() |
[in] | values | Pointer the the values |
status_t ramses::Appearance::setInputValueVector4i | ( | const UniformInput & | input, |
int32_t | x, | ||
int32_t | y, | ||
int32_t | z, | ||
int32_t | w | ||
) |
Sets value of the input.
[in] | input | The effect uniform input to set the value to |
[in] | x | The X component value |
[in] | y | The Y component value |
[in] | z | The Z component value |
[in] | w | The W component value |
status_t ramses::Appearance::setInputValueVector4i | ( | const UniformInput & | input, |
uint32_t | elementCount, | ||
const int32_t * | values | ||
) |
Sets values of the input elements.
[in] | input | The effect uniform input to set the value to |
[in] | elementCount | The number of values that are used from values. Must match UniformInput::getElementCount() |
[in] | values | Pointer the the values |
status_t ramses::Appearance::setScissorTest | ( | EScissorTest | state, |
int16_t | x, | ||
int16_t | y, | ||
uint16_t | width, | ||
uint16_t | height | ||
) |
Enables or disables scissor test and sets region for scissor test.
[in] | state | Flag denoting enabling or disabling scissor test. |
[in] | x | Offset of scissor region on x-axis. |
[in] | y | Offset of scissor region on y-axis. |
[in] | width | Width of scissor region. |
[in] | height | Height of scissor region. |
status_t ramses::Appearance::setStencilFunction | ( | EStencilFunc | func, |
uint8_t | ref, | ||
uint8_t | mask | ||
) |
Sets stencil function, reference and mask value for stencil testing. Stencil is disabled by default.
[in] | func | Stencil function to be used |
[in] | ref | Stencil reference value to be used |
[in] | mask | Stencil mask value to be used |
status_t ramses::Appearance::setStencilOperation | ( | EStencilOperation | sfail, |
EStencilOperation | dpfail, | ||
EStencilOperation | dppass | ||
) |
Sets stencil operations for stencil testing. Default stencil operation values are keep.
[in] | sfail | Stencil operation when stencil test fails |
[in] | dpfail | Stencil operation when the stencil test passes, but the depth test fails |
[in] | dppass | Stencil operation when both the stencil test and the depth test pass |
status_t ramses::Appearance::unbindInput | ( | const UniformInput & | input | ) |
Unbind a previously bound DataObject from the Appearance's uniform input. Any previously set value that was set before binding will now be used. Appropriate set/getInputValue*
() method must be used to set or get the value or another DataObject can be bound.
[in] | input | The effect uniform input to unbind the DataObject from |
|
friend |
Scene is the factory for creating Appearance instances.
class AppearanceImpl& ramses::Appearance::impl |
Stores internal data for implementation specifics of Appearance.