Sigh, stupid OpenGL

Apparently glGetUniformIndices has different declarations on different
systems.
This commit is contained in:
Kovid Goyal 2017-08-30 10:38:54 +05:30
parent 4c0cf93562
commit 8624dbac2c
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -472,7 +472,7 @@ get_uniform_block_offsets(PyObject UNUSED *self, PyObject *args) {
names[i] = PyUnicode_AsUTF8(t); names[i] = PyUnicode_AsUTF8(t);
Py_CLEAR(t); Py_CLEAR(t);
} }
glGetUniformIndices(program_id, count, (const GLchar * const*)names, indices); glGetUniformIndices(program_id, count, (void*)names, indices);
glGetActiveUniformsiv(program_id, count, indices, GL_UNIFORM_OFFSET, offsets); glGetActiveUniformsiv(program_id, count, indices, GL_UNIFORM_OFFSET, offsets);
for (GLsizei i = 0; i < count; i++) PyTuple_SET_ITEM(ans, i, PyLong_FromLong(offsets[i])); for (GLsizei i = 0; i < count; i++) PyTuple_SET_ITEM(ans, i, PyLong_FromLong(offsets[i]));
PyMem_Free(names); PyMem_Free(indices); PyMem_Free(offsets); PyMem_Free(names); PyMem_Free(indices); PyMem_Free(offsets);