VertexStreamAttribute is used to specify the vertex attribute for drawing, which is correspondent to glVertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr). More...
Public Member Functions | |
VertexStreamAttribute () | |
Constructor. | |
VertexStreamAttribute (int offset, int semantic, int type, int size) | |
Constructor The offset of the attribute. More... | |
VertexStreamAttribute ( var offset, var semantic, var type, var size) | |
Constructor The offset of the attribute. More... | |
VertexStreamAttribute ( local offset, local semantic, local type, local size) | |
Constructor The offset of the attribute. More... | |
VertexStreamAttribute (int offset, int semantic, int type, int size, bool normalize) | |
Constructor The offset of the attribute. More... | |
Public Attributes | |
bool | _normalize |
Whether the attribute should be normalized or not. | |
int | _offset |
The offset of the attribute in the buffer. | |
int | _semantic |
Describe that the attribute usage, could be Position, Color etc. | |
int | _type |
Describe the type of attribute, could be GL_FLOAT, GL_UNSIGNED_BYTE etc. | |
int | _size |
Describe how many elements of type in the attribute. | |
VertexStreamAttribute is used to specify the vertex attribute for drawing, which is correspondent to glVertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr).
_semantic -> index _size -> size _type -> type _normalize -> normalized _offset is used to compute the start offset in a interleaved array, take a V3F_C4B_T2F array, offset of vertex will be 0, offset of color would be 0 + sizeof(float) * 3 = 12, offset of texture coord would be 12 + sizeof(char) * 4 = 16.
|
inline |
Constructor The offset of the attribute.
The semantic (Position, Texcoord, Color etc) of attribute. The type of attribute, could be GL_FLOAT, GL_UNSIGNED_BYTE etc. Describe how many elements of type in the attribute.
|
inline |
Constructor The offset of the attribute.
The semantic (Position, Texcoord, Color etc) of attribute. The type of attribute, could be GL_FLOAT, GL_UNSIGNED_BYTE etc. Describe how many elements of type in the attribute.
|
inline |
Constructor The offset of the attribute.
The semantic (Position, Texcoord, Color etc) of attribute. The type of attribute, could be GL_FLOAT, GL_UNSIGNED_BYTE etc. Describe how many elements of type in the attribute.
|
inline |
Constructor The offset of the attribute.
The semantic (Position, Texcoord, Color etc) of attribute. The type of attribute, could be GL_FLOAT, GL_UNSIGNED_BYTE etc. Describe how many elements of type in the attribute. If true, the data will be normalized by deviding 255.
|
inline |
Constructor The offset of the attribute.
The semantic (Position, Texcoord, Color etc) of attribute. The type of attribute, could be GL_FLOAT, GL_UNSIGNED_BYTE etc. Describe how many elements of type in the attribute. If true, the data will be normalized by deviding 255.
|
inline |
Constructor The offset of the attribute.
The semantic (Position, Texcoord, Color etc) of attribute. The type of attribute, could be GL_FLOAT, GL_UNSIGNED_BYTE etc. Describe how many elements of type in the attribute. If true, the data will be normalized by deviding 255.