Support vertex attrib divisors

This commit is contained in:
Kovid Goyal
2017-08-21 23:24:05 +05:30
parent 67ec04fba3
commit afa767c3a8
3 changed files with 27 additions and 9 deletions

View File

@@ -695,6 +695,15 @@ VertexAttribPointer(PyObject UNUSED *self, PyObject *args) {
Py_RETURN_NONE;
}
static PyObject*
VertexAttribDivisor(PyObject UNUSED *self, PyObject *args) {
unsigned int index, divisor;
if (!PyArg_ParseTuple(args, "II", &index, &divisor)) return NULL;
glVertexAttribDivisor(index, divisor);
CHECK_ERROR;
Py_RETURN_NONE;
}
static PyObject*
Flush(PyObject UNUSED *self) {
glFinish();
@@ -798,6 +807,7 @@ int add_module_gl_constants(PyObject *module) {
METH(Disable, METH_O) \
METH(EnableVertexAttribArray, METH_O) \
METH(VertexAttribPointer, METH_VARARGS) \
METH(VertexAttribDivisor, METH_VARARGS) \
METH(GetProgramInfoLog, METH_O) \
METH(GetShaderInfoLog, METH_O) \
METH(ActiveTexture, METH_O) \