File: _errors.py

package info (click to toggle)
pyopengl 3.1.6%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 14,732 kB
  • sloc: python: 106,016; makefile: 8
file content (21 lines) | stat: -rw-r--r-- 538 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from OpenGL.error import _ErrorChecker, EGLError
from OpenGL import platform as _p

class EGLError( EGLError ):
    @property 
    def err(self):
        from OpenGL.EGL import debug
        return debug.eglErrorName(self.__dict__.get('err'))
    @err.setter 
    def err(self, value):
        self.__dict__['err'] = value

if _ErrorChecker:
    _error_checker = _ErrorChecker( 
        _p.PLATFORM, 
        _p.PLATFORM.EGL.eglGetError, 
        0x3000, # EGL_SUCCESS,
        errorClass = EGLError,
    )
else:
    _ErrorChecker = None