Method GL.GLSLUtils.GLSLProgram()->vertex_pointer()
- Method
vertex_pointer
void
vertex_pointer(string
name
,int
ptr
,int
size
,int
type
,bool
normalize
,int
stride
,int
offset
)- Description
Add a single vertex attribute pointer. This is usually used in combination with glDrawArrays to quickly draw a lot of primitives.
name
is the name of the vertex type variable in the program.ptr
is the vertex buffer ID.size
is the size of the attribute (a vec3 has size 3, as an example)type
is the type, usually GL_FLOAT (actually, anything else requires extensions not currently supported by this class) Ifnormalize
is true, the value will be clamped between 0.0 and 1.0.stride
is the distance between two attributes of this type in the buffer, andoffset
is the offset from the start of the buffer to the first attribute.