X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=specs%2Fgltypes.py;h=a04990d9ec33ec72550e39aa3a5a3834e1b20187;hb=HEAD;hp=2f565cd7c2aac9e7ea7ca1124ff5f084209fde42;hpb=8efcb8556a3cfc884b4af5ab36407395d2cfdbab;p=apitrace diff --git a/specs/gltypes.py b/specs/gltypes.py index 2f565cd..a04990d 100644 --- a/specs/gltypes.py +++ b/specs/gltypes.py @@ -100,11 +100,14 @@ GLshader = Handle("shader", GLuint) GLlocation = Handle("location", GLint, key=('program', GLhandleARB)) GLlocationARB = Handle("location", GLint, key=('programObj', GLhandleARB)) +contextKey = ('reinterpret_cast(glretrace::getCurrentContext())', UIntPtr) + GLprogramARB = Handle("programARB", GLuint) GLframebuffer = Handle("framebuffer", GLuint) GLrenderbuffer = Handle("renderbuffer", GLuint) GLfragmentShaderATI = Handle("fragmentShaderATI", GLuint) -GLarray = Handle("array", GLuint) +GLarray = Handle("array", GLuint, key=contextKey) # per-context +GLarrayAPPLE = Handle("arrayAPPLE", GLuint) # shared GLregion = Handle("region", GLuint) GLpipeline = Handle("pipeline", GLuint) GLsampler = Handle("sampler", GLuint) @@ -230,3 +233,20 @@ GLbitfield_barrier = Flags(GLbitfield, [ "GL_ATOMIC_COUNTER_BARRIER_BIT", # 0x00001000 ]) +# GL_ARB_vertex_array_bgra +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, + )