GLlocation = Handle("location", GLint, key=('program', GLhandleARB))
GLlocationARB = Handle("location", GLint, key=('programObj', GLhandleARB))
-contextKey = ('reinterpret_cast<uintptr_t>(glretrace::currentContext)', UIntPtr)
+contextKey = ('reinterpret_cast<uintptr_t>(glretrace::getCurrentContext())', UIntPtr)
GLprogramARB = Handle("programARB", GLuint)
GLframebuffer = Handle("framebuffer", GLuint)
size_bgra = FakeEnum(GLint, [
"GL_BGRA",
])
+
+
+def GLindexBuffer(countExpr, typeExpr):
+ # Indices arguments are polymorphic:
+ # - offsets when element array buffer is bound
+ # - or a blob otherwise.
+ sizeExpr = '%s*_gl_type_size(%s)' % (countExpr, typeExpr)
+ return Polymorphic('_element_array_buffer_binding()', [
+ ('0', Blob(Const(GLvoid), sizeExpr)),
+ ],
+ IntPointer("const GLvoid *"),
+ contextLess=False,
+ )