Download lib/python3.9/site-packages/OpenGL/_opaque.py from camenduru/slahmr-test: direct link, hf CLI and curl.
- Browser
- Download file 728 Bytes
-
https://huggingface.co/camenduru/slahmr-test/resolve/main/lib/python3.9/site-packages/OpenGL/_opaque.py
- Command line
-
hf download hf://camenduru/slahmr-test/lib/python3.9/site-packages/OpenGL/_opaque.py
-
curl -L -o _opaque.py https://huggingface.co/camenduru/slahmr-test/resolve/main/lib/python3.9/site-packages/OpenGL/_opaque.py
728 Bytes
| """Data-type definitions for EGL/GLES""" | |
| import ctypes | |
| pointer = ctypes.pointer | |
| class _Opaque( ctypes.Structure ): | |
| """An Opaque Structure reference (base class)""" | |
| class _opaque_pointer( ctypes.POINTER( _Opaque ) ): | |
| _type_ = _Opaque | |
| def from_param( cls, value ): | |
| return ctypes.cast( value, cls ) | |
| def address( self ): | |
| return ctypes.addressof( self.contents ) | |
| def as_voidp( self ): | |
| return ctypes.c_voidp( self.address ) | |
| def opaque_pointer_cls( name ): | |
| """Create an Opaque pointer class for the given name""" | |
| typ = type( name, (_Opaque,), {} ) | |
| p_typ = type( name+'_pointer', (_opaque_pointer,), {'_type_':typ}) | |
| return p_typ | |