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...
|
| VertexStreamAttribute () |
| Constructor.
|
|
| VertexStreamAttribute () |
| Constructor.
|
|
| VertexStreamAttribute () |
| Constructor.
|
|
| VertexStreamAttribute (int offset, int semantic, int type, int size) |
| Constructor. More...
|
|
| VertexStreamAttribute ( var offset, var semantic, var type, var size) |
| Constructor. More...
|
|
| VertexStreamAttribute ( local offset, local semantic, local type, local size) |
| Constructor. More...
|
|
| VertexStreamAttribute (int offset, int semantic, int type, int size, bool normalize) |
| Constructor. More...
|
|
| VertexStreamAttribute ( var offset, var semantic, var type, var size, var normalize) |
| Constructor. More...
|
|
| VertexStreamAttribute ( local offset, local semantic, local type, local size, local normalize) |
| Constructor. More...
|
|
|
bool | _normalize |
| Whether the attribute should be normalized or not.
|
|
int | _offset |
| The offset of the attribute in the buffer.
|
|
local | _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.
Constructor.
- Parameters
-
offset | The offset of the attribute. |
semantic | The semantic (Position, Texcoord, Color etc) of attribute. |
type | The type of attribute, could be GL_FLOAT, GL_UNSIGNED_BYTE etc. |
size | Describe how many elements of type in the attribute. |
Constructor.
- Parameters
-
offset | The offset of the attribute. |
semantic | The semantic (Position, Texcoord, Color etc) of attribute. |
type | The type of attribute, could be GL_FLOAT, GL_UNSIGNED_BYTE etc. |
size | Describe how many elements of type in the attribute. |
Constructor.
- Parameters
-
offset | The offset of the attribute. |
semantic | The semantic (Position, Texcoord, Color etc) of attribute. |
type | The type of attribute, could be GL_FLOAT, GL_UNSIGNED_BYTE etc. |
size | Describe how many elements of type in the attribute. |
Constructor.
- Parameters
-
offset | The offset of the attribute. |
semantic | The semantic (Position, Texcoord, Color etc) of attribute. |
type | The type of attribute, could be GL_FLOAT, GL_UNSIGNED_BYTE etc. |
size | Describe how many elements of type in the attribute. |
normalize | If true, the data will be normalized by dividing 255. |
Constructor.
- Parameters
-
offset | The offset of the attribute. |
semantic | The semantic (Position, Texcoord, Color etc) of attribute. |
type | The type of attribute, could be GL_FLOAT, GL_UNSIGNED_BYTE etc. |
size | Describe how many elements of type in the attribute. |
normalize | If true, the data will be normalized by dividing 255. |
Constructor.
- Parameters
-
offset | The offset of the attribute. |
semantic | The semantic (Position, Texcoord, Color etc) of attribute. |
type | The type of attribute, could be GL_FLOAT, GL_UNSIGNED_BYTE etc. |
size | Describe how many elements of type in the attribute. |
normalize | If true, the data will be normalized by dividing 255. |
The documentation for this struct was generated from the following file: