51 #ifndef ACG_VERTEXDECLARATION_HH
52 #define ACG_VERTEXDECLARATION_HH
58 #include <ACG/Config/ACGDefines.hh>
78 VERTEX_USAGE_FORCE_DWORD = 0xFFFFFFFF
98 void setByteOffset(
unsigned int _offset);
102 unsigned int getByteOffset()
const;
279 void addElement(
unsigned int _type,
unsigned int _numElements,
VERTEX_USAGE _usage,
const void* _pointer,
const char* _shaderInputName = 0,
unsigned int _divisor = 0,
unsigned int _vbo = 0);
283 void addElement(
unsigned int _type,
unsigned int _numElements,
VERTEX_USAGE _usage,
size_t _byteOffset = 0,
const char* _shaderInputName = 0,
unsigned int _divisor = 0,
unsigned int _vbo = 0);
287 void addElements(
unsigned int _numElements,
const VertexElement* _pElements);
296 void activateFixedFunction()
const;
300 void deactivateFixedFunction()
const;
318 void setVertexStride(
unsigned int _stride);
322 unsigned int getVertexStride(
unsigned int i = 0)
const;
326 unsigned int getNumElements()
const;
342 static unsigned int getGLTypeSize(
unsigned int _type);
346 static unsigned int getElementSize(
const VertexElement* _pElement);
350 static bool supportsInstancedArrays();
354 QString toString()
const;
362 void updateOffsets();
370 std::vector<VertexElement> elements_;
389 #endif // ACG_VERTEXDECLARATION_HH defined
Namespace providing different geometric functions concerning angles.
unsigned int vertexStride_
Offset in bytes between each vertex.
Description of one vertex element.
defined by user via VertexElement::shaderInputName_
int strideUserDefined_
Flag that indicates, whether the stride was set by user or derived automatically. ...
This namespace contains all the classes and functions for handling GLSL shader and program objects...
unsigned int divisor_
For instanced rendering: Step rate describing how many instances are drawn before advancing to the ne...
unsigned int vbo_
Explicit vbo source of this element, set to 0 if the buffer bound at the time of activating the decla...
Class to define the vertex input layout.
unsigned int type_
GL_FLOAT, GL_UNSIGNED_BYTE, GL_INT, ...
unsigned int numElements_
how many elements of type_
VERTEX_USAGE usage_
position, normal, shader input ..
const char * shaderInputName_
set shader input name, if usage_ = VERTEX_USAGE_USER_DEFINED otherwise this is set automatically...
VERTEX_USAGE
-— input name in vertex shader ----—
const void * pointer_
Offset in bytes to the first occurrence of this element in vertex buffer; Or address to vertex data i...
std::map< unsigned int, unsigned int > vertexStridesVBO_
Map vbo to offset in bytes between each vertex in that vbo.