GLuint64 = GLuint64EXT = _defineType('GLuint64', ctypes.c_uint64, long ) GLint64 = GLint64EXT = _defineType('GLint64', ctypes.c_int64, long ) # ptrdiff_t, actually... GLsizeiptrARB = GLsizeiptr = GLsizei GLvdpauSurfaceNV = GLintptrARB = GLintptr = GLsizei size_t = ctypes.c_size_t void = None GLhalfNV = GLhalfARB = ctypes.c_ushort # GL.ARB.sync extension, GLsync is an opaque pointer to a struct # in the extensions header, basically just a "token" that can be # passed to the various operations... GLsync = _opaque_pointer_cls( 'GLsync' ) GLvoidp = ctypes.c_void_p ARRAY_TYPE_TO_CONSTANT = [ ('GLclampd', GL_DOUBLE), ('GLclampf', GL_FLOAT), ('GLfloat', GL_FLOAT), ('GLdouble', GL_DOUBLE), ('GLbyte', GL_BYTE), ('GLshort', GL_SHORT), ('GLint', GL_INT), ('GLubyte', GL_UNSIGNED_BYTE), ('GLushort', GL_UNSIGNED_SHORT), ('GLuint', GL_UNSIGNED_INT), ('GLenum', GL_UNSIGNED_INT), ]
# ptrdiff_t, actually... GLsizeiptrARB = GLsizeiptr = GLsizei GLvdpauSurfaceNV = GLintptrARB = GLintptr = GLsizei size_t = ctypes.c_size_t int32_t = ctypes.c_int32 int64_t = ctypes.c_int64 void = None GLhalfNV = GLhalfARB = ctypes.c_ushort # GL.ARB.sync extension, GLsync is an opaque pointer to a struct # in the extensions header, basically just a "token" that can be # passed to the various operations... GLsync = _opaque_pointer_cls('GLsync') GLvoidp = ctypes.c_void_p ARRAY_TYPE_TO_CONSTANT = [ ('GLclampd', GL_DOUBLE), ('GLclampf', GL_FLOAT), ('GLfloat', GL_FLOAT), ('GLdouble', GL_DOUBLE), ('GLbyte', GL_BYTE), ('GLshort', GL_SHORT), ('GLint', GL_INT), ('GLubyte', GL_UNSIGNED_BYTE), ('GLushort', GL_UNSIGNED_SHORT), ('GLuint', GL_UNSIGNED_INT), ('GLenum', GL_UNSIGNED_INT), ]
def pullVersion( self ): from OpenGL.EGL import ( eglQueryString, EGL_VERSION ) return eglQueryString( self.getDisplay(), EGL_VERSION ) def pullExtensions( self ): from OpenGL.EGL import eglQueryString, EGL_EXTENSIONS return eglQueryString( self.getDisplay(), EGL_EXTENSIONS ) EGLQuerier=_EGLQuerier() EGLBoolean = ctypes.c_uint32 EGLenum = ctypes.c_uint32 EGLint = c_int = ctypes.c_int32 EGLConfig = _opaque_pointer_cls( 'EGLConfig' ) EGLContext = _opaque_pointer_cls( 'EGLContext' ) EGLDisplay = _opaque_pointer_cls( 'EGLDisplay' ) EGLSurface = _opaque_pointer_cls( 'EGLSurface' ) EGLClientBuffer = _opaque_pointer_cls( 'EGLClientBuffer' ) EGLImageKHR = EGLImage = _opaque_pointer_cls( 'EGLImageKHR' ) EGLScreenMESA = ctypes.c_ulong EGLModeMESA = ctypes.c_ulong EGLNativeFileDescriptorKHR = ctypes.c_int EGLSyncKHR = EGLSyncNV = EGLSync = _opaque_pointer_cls( 'EGLSync' ) EGLTimeKHR = EGLTimeNV = EGLTime = ctypes.c_ulonglong EGLuint64KHR = EGLuint64NV = ctypes.c_ulonglong EGLStreamKHR = _opaque_pointer_cls( 'EGLStream' )
def pullVersion(self): from OpenGL.EGL import (eglQueryString, EGL_VERSION) return eglQueryString(self.getDisplay(), EGL_VERSION) def pullExtensions(self): from OpenGL.EGL import eglQueryString, EGL_EXTENSIONS return eglQueryString(self.getDisplay(), EGL_EXTENSIONS) EGLQuerier = _EGLQuerier() EGLBoolean = ctypes.c_uint32 EGLenum = ctypes.c_uint32 EGLint = c_int = ctypes.c_int32 EGLConfig = _opaque_pointer_cls('EGLConfig') EGLContext = _opaque_pointer_cls('EGLContext') EGLDisplay = _opaque_pointer_cls('EGLDisplay') EGLSurface = _opaque_pointer_cls('EGLSurface') EGLClientBuffer = _opaque_pointer_cls('EGLClientBuffer') EGLImageKHR = EGLImage = _opaque_pointer_cls('EGLImageKHR') EGLScreenMESA = ctypes.c_ulong EGLModeMESA = ctypes.c_ulong EGLNativeFileDescriptorKHR = ctypes.c_int EGLSyncKHR = EGLSyncNV = EGLSync = _opaque_pointer_cls('EGLSync') EGLTimeKHR = EGLTimeNV = EGLTime = ctypes.c_ulonglong EGLuint64KHR = EGLuint64NV = ctypes.c_ulonglong EGLStreamKHR = _opaque_pointer_cls('EGLStream')
# ptrdiff_t, actually... GLsizeiptrARB = GLsizeiptr = GLsizei GLvdpauSurfaceNV = GLintptrARB = GLintptr = GLsizei size_t = ctypes.c_size_t int32_t = ctypes.c_int32 int64_t = ctypes.c_int64 void = None # this is *wrong*, half is a *float* type, but ctypes doesn"t have 16-bit float support GLhalfNV = GLhalfARB = ctypes.c_ushort # GL.ARB.sync extension, GLsync is an opaque pointer to a struct # in the extensions header, basically just a "token" that can be # passed to the various operations... GLsync = _opaque_pointer_cls("GLsync") GLvoidp = ctypes.c_void_p ARRAY_TYPE_TO_CONSTANT = [("GLclampd", GL_DOUBLE), ("GLclampf", GL_FLOAT), ("GLfloat", GL_FLOAT), ("GLdouble", GL_DOUBLE), ("GLbyte", GL_BYTE), ("GLshort", GL_SHORT), ("GLint", GL_INT), ("GLubyte", GL_UNSIGNED_BYTE), ("GLushort", GL_UNSIGNED_SHORT), ("GLuint", GL_UNSIGNED_INT), ("GLenum", GL_UNSIGNED_INT)] # PLATFORM GLDEBUGPROCARB = GLDEBUGPROCKHR = GLDEBUGPROC = _p.DEFAULT_FUNCTION_TYPE( void, GLenum, # source, GLenum, # type,
('nVersion', WORD), ('dwFlags', DWORD), ('iPixelType', BYTE), ('cColorBits', BYTE), ('cRedBits', BYTE), ('cRedShift', BYTE), ('cGreenBits', BYTE), ('cGreenShift', BYTE), ('cBlueBits', BYTE), ('cBlueShift', BYTE), ('cAlphaBits', BYTE), ('cAlphaShift', BYTE), ('cAccumBits', BYTE), ('cAccumRedBits', BYTE), ('cAccumGreenBits', BYTE), ('cAccumBlueBits', BYTE), ('cAccumAlphaBits', BYTE), ('cAccumDepthBits', BYTE), ('cAccumStencilBits', BYTE), ('cAuxBuffers', BYTE), ('iLayerType', BYTE), ('bReserved', BYTE), ('dwLayerMask', DWORD), ('dwVisibleMask', DWORD), ('dwDamageMask', DWORD), ] # TODO: This is *not* a working definition, calling any function with this will segfault HENHMETAFILE = _opaque_pointer_cls('HENHMETAFILE')
def pullVersion(self): from OpenGL.EGL import (eglQueryString, EGL_VERSION) return eglQueryString(self.getDisplay(), EGL_VERSION) def pullExtensions(self): from OpenGL.EGL import eglQueryString, EGL_EXTENSIONS return eglQueryString(self.getDisplay(), EGL_EXTENSIONS) EGLQuerier = _EGLQuerier() EGLBoolean = ctypes.c_uint32 EGLenum = ctypes.c_uint32 EGLint = c_int = ctypes.c_int32 EGLConfig = _opaque_pointer_cls("EGLConfig") EGLContext = _opaque_pointer_cls("EGLContext") EGLDisplay = _opaque_pointer_cls("EGLDisplay") EGLSurface = _opaque_pointer_cls("EGLSurface") EGLClientBuffer = _opaque_pointer_cls("EGLClientBuffer") EGLImageKHR = EGLImage = _opaque_pointer_cls("EGLImageKHR") EGLDeviceEXT = _opaque_pointer_cls("EGLDeviceEXT") EGLOutputLayerEXT = _opaque_pointer_cls("EGLOutputLayerEXT") EGLOutputPortEXT = _opaque_pointer_cls("EGLOutputPortEXT") EGLScreenMESA = ctypes.c_ulong EGLModeMESA = ctypes.c_ulong EGLNativeFileDescriptorKHR = ctypes.c_int EGLSyncKHR = EGLSyncNV = EGLSync = _opaque_pointer_cls("EGLSync")
("nVersion", WORD), ("dwFlags", DWORD), ("iPixelType", BYTE), ("cColorBits", BYTE), ("cRedBits", BYTE), ("cRedShift", BYTE), ("cGreenBits", BYTE), ("cGreenShift", BYTE), ("cBlueBits", BYTE), ("cBlueShift", BYTE), ("cAlphaBits", BYTE), ("cAlphaShift", BYTE), ("cAccumBits", BYTE), ("cAccumRedBits", BYTE), ("cAccumGreenBits", BYTE), ("cAccumBlueBits", BYTE), ("cAccumAlphaBits", BYTE), ("cAccumDepthBits", BYTE), ("cAccumStencilBits", BYTE), ("cAuxBuffers", BYTE), ("iLayerType", BYTE), ("bReserved", BYTE), ("dwLayerMask", DWORD), ("dwVisibleMask", DWORD), ("dwDamageMask", DWORD), ] # TODO: This is *not* a working definition, calling any function with this will segfault HENHMETAFILE = _opaque_pointer_cls("HENHMETAFILE")
('nSize',WORD), ('nVersion',WORD), ('dwFlags',DWORD), ('iPixelType',BYTE), ('cColorBits',BYTE), ('cRedBits',BYTE), ('cRedShift',BYTE), ('cGreenBits',BYTE), ('cGreenShift',BYTE), ('cBlueBits',BYTE), ('cBlueShift',BYTE), ('cAlphaBits',BYTE), ('cAlphaShift',BYTE), ('cAccumBits',BYTE), ('cAccumRedBits',BYTE), ('cAccumGreenBits',BYTE), ('cAccumBlueBits',BYTE), ('cAccumAlphaBits',BYTE), ('cAccumDepthBits',BYTE), ('cAccumStencilBits',BYTE), ('cAuxBuffers',BYTE), ('iLayerType',BYTE), ('bReserved',BYTE), ('dwLayerMask',DWORD), ('dwVisibleMask',DWORD), ('dwDamageMask',DWORD), ] # TODO: This is *not* a working definition, calling any function with this will segfault HENHMETAFILE = _opaque_pointer_cls( 'HENHMETAFILE' )