mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-25 17:52:02 +02:00
Support vertex attrib divisors
This commit is contained in:
10
kitty/gl.h
10
kitty/gl.h
@@ -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) \
|
||||
|
||||
Reference in New Issue
Block a user