Method GL.GLSLUtils.GLSLProgram()->vertex_pointer()
- Method
vertex_pointer
voidvertex_pointer(stringname,intptr,intsize,inttype,boolnormalize,intstride,intoffset)- Description
Add a single vertex attribute pointer. This is usually used in combination with glDrawArrays to quickly draw a lot of primitives.
nameis the name of the vertex type variable in the program.ptris the vertex buffer ID.sizeis the size of the attribute (a vec3 has size 3, as an example)typeis the type, usually GL_FLOAT (actually, anything else requires extensions not currently supported by this class) Ifnormalizeis true, the value will be clamped between 0.0 and 1.0.strideis the distance between two attributes of this type in the buffer, andoffsetis the offset from the start of the buffer to the first attribute.