9 #ifndef RAMSES_APPEARANCE_H
10 #define RAMSES_APPEARANCE_H
21 class TextureSamplerMS;
22 class TextureSamplerExternal;
898 friend class SceneImpl;
#define RAMSES_API
Definition: APIExport.h:35
The Appearance describes how an object should look like. This includes GLSL uniform values,...
Definition: Appearance.h:34
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.
const DataObject * getDataObjectBoundToInput(const UniformInput &input) const
Gets the data object bound to a uniform input.
status_t getStencilOperation(EStencilOperation &sfail, EStencilOperation &dpfail, EStencilOperation &dppass) const
Gets stencil operations.
status_t getCullingMode(ECullMode &mode) const
Gets the culling mode indicating which side of mesh will be removed before rasterization.
status_t getInputTextureMS(const UniformInput &input, const TextureSamplerMS *&textureSampler) const
Gets texture sampler currently set to the input.
status_t setInputTexture(const UniformInput &input, const TextureSamplerMS &textureSampler)
Sets multisampled texture sampler to the input.
status_t getInputTextureExternal(const UniformInput &input, const TextureSamplerExternal *&textureSampler) const
Gets texture sampler currently set to the input.
status_t getInputValueMatrix22f(const UniformInput &input, uint32_t elementCount, float *valuesOut) const
Gets current values of the input.
status_t setInputValueMatrix22f(const UniformInput &input, uint32_t elementCount, const float *values)
Sets values of the input elements.
status_t setDrawMode(EDrawMode mode)
Sets the draw mode indicating by which primitive the mesh will be rendered Default draw mode is Trian...
status_t setInputValueVector3f(const UniformInput &input, uint32_t elementCount, const float *values)
Sets values of the input elements.
status_t getInputValueInt32(const UniformInput &input, uint32_t elementCount, int32_t *valuesOut) const
Gets current values of the input.
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....
status_t getInputValueFloat(const UniformInput &input, float &valueOut) const
Gets the value of the input.
status_t unbindInput(const UniformInput &input)
Unbind a previously bound DataObject from the Appearance's uniform input. Any previously set value th...
status_t setInputValueVector2f(const UniformInput &input, float x, float y)
Sets value of the input.
status_t getScissorTestState(EScissorTest &state) const
Gets the current state of scissor test.
status_t getBlendingOperations(EBlendOperation &operationColor, EBlendOperation &operationAlpha) const
Gets blending operation for color and alpha.
bool isInputBound(const UniformInput &input) const
Check whether a uniform input has any DataObject bound to it.
status_t getInputValueFloat(const UniformInput &input, uint32_t elementCount, float *valuesOut) const
Gets current values of the input.
status_t getInputValueVector3f(const UniformInput &input, uint32_t elementCount, float *valuesOut) const
Gets current values of the input.
status_t setInputValueMatrix44f(const UniformInput &input, uint32_t elementCount, const float *values)
Sets values of the input elements.
status_t setInputValueVector4i(const UniformInput &input, uint32_t elementCount, const int32_t *values)
Sets values of the input elements.
status_t getInputValueInt32(const UniformInput &input, int32_t &i) const
Gets the value of the input.
status_t setInputValueVector3f(const UniformInput &input, float x, float y, float z)
Sets value of the input.
status_t setInputValueVector4f(const UniformInput &input, float x, float y, float z, float w)
Sets value of the input.
status_t getInputValueMatrix44f(const UniformInput &input, uint32_t elementCount, float *valuesOut) const
Gets current values of the input.
status_t getInputValueVector2f(const UniformInput &input, float &x, float &y) const
Gets the value of the input.
status_t setInputValueVector3i(const UniformInput &input, uint32_t elementCount, const int32_t *values)
Sets values of the input elements.
Appearance(const Appearance &other)
Copy constructor of Appearance.
status_t getColorWriteMask(bool &writeRed, bool &writeGreen, bool &writeBlue, bool &writeAlpha) const
Gets color write mask.
status_t setInputValueVector4i(const UniformInput &input, int32_t x, int32_t y, int32_t z, int32_t w)
Sets value of the input.
status_t getBlendingFactors(EBlendFactor &srcColor, EBlendFactor &destColor, EBlendFactor &srcAlpha, EBlendFactor &destAlpha) const
Gets blending factors for source/destination color/alpha.
status_t getDepthFunction(EDepthFunc &func) const
Gets depth comparison function.
status_t setInputValueVector2i(const UniformInput &input, int32_t x, int32_t y)
Sets value of the input.
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.
status_t setInputValueFloat(const UniformInput &input, uint32_t elementCount, const float *values)
Sets values of the input elements.
status_t getInputValueMatrix33f(const UniformInput &input, float valueOut[9]) const
Gets the value of the input.
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...
status_t setCullingMode(ECullMode mode)
Sets the culling mode indicating which side of mesh will be removed before rasterization....
status_t getInputValueVector3i(const UniformInput &input, int32_t &x, int32_t &y, int32_t &z) const
Gets the value of the input.
status_t getInputValueVector2f(const UniformInput &input, uint32_t elementCount, float *valuesOut) const
Gets current values of the input.
status_t setInputValueInt32(const UniformInput &input, uint32_t elementCount, const int32_t *values)
Sets values of the input elements.
status_t setInputTexture(const UniformInput &input, const TextureSamplerExternal &textureSampler)
Sets external texture sampler to the input.
status_t setInputValueMatrix33f(const UniformInput &input, const float values[9])
Sets value of the input.
status_t setInputValueVector2i(const UniformInput &input, uint32_t elementCount, const int32_t *values)
Sets values of the input elements.
status_t getInputValueVector4f(const UniformInput &input, uint32_t elementCount, float *valuesOut) const
Gets current values of the input.
Appearance & operator=(const Appearance &other)
Assignment operator of Appearance.
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.
status_t setInputValueInt32(const UniformInput &input, int32_t i)
Sets value of the input.
status_t setInputValueMatrix22f(const UniformInput &input, const float values[4])
Sets value of the input.
status_t setInputValueFloat(const UniformInput &input, float value)
Sets value of the input.
status_t getDepthWriteMode(EDepthWrite &mode) const
Gets the current state of writing to depth buffer.
status_t getInputValueMatrix44f(const UniformInput &input, float valueOut[16]) const
Gets the value of the input.
status_t setDepthWrite(EDepthWrite mode)
Enables or disables writing to depth buffer.
status_t getInputValueVector2i(const UniformInput &input, int32_t &x, int32_t &y) const
Gets the value of the input.
status_t getInputTexture(const UniformInput &input, const TextureSampler *&textureSampler) const
Gets texture sampler currently set to the input.
status_t getInputValueVector3i(const UniformInput &input, uint32_t elementCount, int32_t *valuesOut) const
Gets current values of the input.
status_t getStencilFunction(EStencilFunc &func, uint8_t &ref, uint8_t &mask) const
Gets stencil function, reference and mask value.
class AppearanceImpl & impl
Definition: Appearance.h:290
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 enab...
status_t getInputValueMatrix22f(const UniformInput &input, float valueOut[4]) const
Gets the value of the input.
const Effect & getEffect() const
Gets the effect used to create this appearance.
status_t setInputValueMatrix33f(const UniformInput &input, uint32_t elementCount, const float *values)
Sets values of the input elements.
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 ...
status_t setInputValueVector4f(const UniformInput &input, uint32_t elementCount, const float *values)
Sets values of the input elements.
status_t setDepthFunction(EDepthFunc func)
Sets depth comparison function. Depth writing has to be enabled in order for this to have any effect....
Appearance(AppearanceImpl &pimpl)
Constructor of Appearance.
status_t setInputValueMatrix44f(const UniformInput &input, const float values[16])
Sets value of the input.
status_t getInputValueVector4f(const UniformInput &input, float &x, float &y, float &z, float &w) const
Gets the value of the input.
status_t getInputValueMatrix33f(const UniformInput &input, uint32_t elementCount, float *valuesOut) const
Gets current values of the input.
status_t setInputTexture(const UniformInput &input, const TextureSampler &textureSampler)
Sets texture sampler to the input.
status_t setStencilOperation(EStencilOperation sfail, EStencilOperation dpfail, EStencilOperation dppass)
Sets stencil operations for stencil testing. Default stencil operation values are keep.
status_t getInputValueVector4i(const UniformInput &input, uint32_t elementCount, int32_t *valuesOut) const
Gets current values of the input.
status_t getInputValueVector2i(const UniformInput &input, uint32_t elementCount, int32_t *valuesOut) const
Gets current values of the input.
virtual ~Appearance()
Destructor of the Appearance.
status_t setInputValueVector2f(const UniformInput &input, uint32_t elementCount, const float *values)
Sets values of the input elements.
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 a...
status_t getInputValueVector3f(const UniformInput &input, float &x, float &y, float &z) const
Gets the value of the input.
status_t getBlendingColor(float &red, float &green, float &blue, float &alpha) const
Gets blending color set via setBlendingColor.
status_t setInputValueVector3i(const UniformInput &input, int32_t x, int32_t y, int32_t z)
Sets value of the input.
status_t getDrawMode(EDrawMode &mode) const
Gets the draw mode indicating by which primitive the mesh will be rendered.
status_t getScissorRegion(int16_t &x, int16_t &y, uint16_t &width, uint16_t &height) const
Gets region for scissor test.
The DataObject is a base class for data container for storing data in a scene.
Definition: DataObject.h:29
An effect describes how an object will be rendered to the screen.
Definition: Effect.h:26
The SceneObject is a base class for all client API objects owned by a Scene.
Definition: SceneObject.h:20
The ramses::TextureSamplerExternal is used to sample from external textures data when bound to a rams...
Definition: TextureSamplerExternal.h:21
The ramses::TextureSamplerMS is used to sample multisampled data when bound to a ramses::Appearance u...
Definition: TextureSamplerMS.h:21
The TextureSampler holds a texture and its sampling parameters.
Definition: TextureSampler.h:29
The RAMSES namespace contains all client side objects and functions used to implement RAMSES applicat...
Definition: AnimatedProperty.h:15
EDepthFunc
Definition: AppearanceEnums.h:125
uint32_t status_t
Status is a handle to the result of an API call.
Definition: RamsesFrameworkTypes.h:26
EStencilOperation
Definition: AppearanceEnums.h:159
EScissorTest
Definition: AppearanceEnums.h:115
ECullMode
Definition: AppearanceEnums.h:93
EDrawMode
Definition: AppearanceEnums.h:175
EStencilFunc
Definition: AppearanceEnums.h:142
EBlendFactor
Definition: AppearanceEnums.h:70
EDepthWrite
Definition: AppearanceEnums.h:105
EBlendOperation
Definition: AppearanceEnums.h:56