8#ifndef META_OCEAN_RENDERING_GLES_ATTRIBUTE_SET_H
9#define META_OCEAN_RENDERING_GLES_ATTRIBUTE_SET_H
49#if defined(OCEAN_GCC_VERSION) && OCEAN_GCC_VERSION > 0 && OCEAN_GCC_VERSION < 50000
virtual AttributeRef attribute(const unsigned int index) const
Returns an attribute specified by the index.
AttributeSet()
Creates a new attribute set object.
This class wraps a GLESceneGraph attribute object.
Definition GLESAttribute.h:36
ProgramType
Definition of different shader functionalities.
Definition GLESAttribute.h:43
@ PT_UNKNOWN
Not specified shader program.
Definition GLESAttribute.h:45
friend class GLESFactory
Definition GLESAttributeSet.h:41
~GLESAttributeSet() override
Destructs a GLESceneGraph attribute set object.
AttributeCounterMap attributeCounterMap_
The map counting the number of attributes;.
Definition GLESAttributeSet.h:138
friend class GLESPhantomAttribute
Definition GLESAttributeSet.h:42
GLESAttribute::ProgramType shaderProgramType_
Shader type necessary for this attribute set.
Definition GLESAttributeSet.h:132
GLESShaderProgramRef shaderProgram() const
Returns the shader of this attribute set.
Definition GLESAttributeSet.h:144
GLESShaderProgramRef shaderProgram_
Shader program specific for this attribute set.
Definition GLESAttributeSet.h:129
std::unordered_map< int, unsigned int > AttributeCounterMap
Definition of an unordered map mapping attribute types to counters.
Definition GLESAttributeSet.h:50
bool shaderProgramTypeIsBasedOnLight_
True, if the current shader program was created for a light source.
Definition GLESAttributeSet.h:141
void resetShaderProgram()
Resets the shader program e.g., because child element has changed after the shader has been selected.
Definition GLESAttributeSet.h:158
void addAttribute(const AttributeRef &attribute) override
Adds a new attribute to this attribute set.
bool containsAttribute(const ObjectType attributeType) const
Returns whether this attribute set contains at least one attribute of a specific type.
Definition GLESAttributeSet.h:151
bool shaderProgramTypeChanged_
True, if the shader has been changed since the last usage.
Definition GLESAttributeSet.h:135
GLESAttributeSet()
Creates a new GLESceneGraph attribute set object.
GLESAttribute::ProgramType determineShaderType(const Lights &lights, const GLESAttribute::ProgramType additionalProgramTypes=GLESAttribute::PT_UNKNOWN, const GLESAttribute *additionalAttribute=nullptr) const
Determines which shader program to use for this entire attribute set.
void unbindAttributes()
Unbinds all attributes of this set.
void removeAttribute(const AttributeRef &attribute) override
Removes a registered attribute from this attribute ses.
void bindAttributes(const GLESFramebuffer &framebuffer, const SquareMatrix4 &projection, const HomogenousMatrix4 &camera_T_model, const HomogenousMatrix4 &camera_T_world, const SquareMatrix3 &normalMatrix, const Lights &lights, const GLESAttribute::ProgramType additionalProgramTypes=GLESAttribute::PT_UNKNOWN, GLESAttribute *const additionalAttribute=nullptr)
Binds the attributes of this set to the internal OpenGL ES shader program as uniforms.
This class implements a base for all GLESceneGraph framebuffers.
Definition rendering/glescenegraph/GLESFramebuffer.h:34
GLESObject()
Creates a new GLESceneGraph object.
Lock objectLock_
Lock for the object.
Definition Object.h:304
ObjectType
Definition of different object type.
Definition Object.h:62
This class implements a scoped lock object for recursive lock objects.
Definition Lock.h:147
HomogenousMatrixT4< Scalar > HomogenousMatrix4
Definition of the HomogenousMatrix4 object, depending on the OCEAN_MATH_USE_SINGLE_PRECISION flag eit...
Definition HomogenousMatrix4.h:44
SquareMatrixT3< Scalar > SquareMatrix3
Definition of the SquareMatrix3 object, depending on the OCEAN_MATH_USE_SINGLE_PRECISION either with ...
Definition SquareMatrix3.h:43
SquareMatrixT4< Scalar > SquareMatrix4
Definition of the SquareMatrix4 object, depending on the OCEAN_MATH_USE_SINGLE_PRECISION either with ...
Definition SquareMatrix4.h:39
SmartObjectRef< Attribute > AttributeRef
Definition of a smart object reference holding an attribute.
Definition Attribute.h:29
std::vector< LightPair > Lights
Definition of a set holding light sources.
Definition GLESLightSource.h:44
SmartObjectRef< GLESShaderProgram > GLESShaderProgramRef
Definition of an object reference for shader program containers.
Definition GLESShaderProgram.h:44
Namespace of the Rendering GLESceneGraph library.
Definition rendering/glescenegraph/android/Android.h:20
Namespace of the Rendering library.
Definition AbsoluteTransform.h:18
The namespace covering the entire Ocean framework.
Definition Accessor.h:15