File: vboimplementation.py

package info (click to toggle)
pyopengl 3.1.5%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 14,668 kB
  • sloc: python: 108,024; makefile: 4
file content (20 lines) | stat: -rw-r--r-- 755 bytes parent folder | download | duplicates (15)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from OpenGL.arrays import vbo
from OpenGL.GLES3.VERSION import GLES3_3_0
from OpenGL.GLES3.OES import mapbuffer

class Implementation( vbo.Implementation ):
    """OpenGL-based implementation of VBO interfaces"""
    def __init__( self ):
        for name in self.EXPORTED_NAMES:
            for source in [ GLES3_3_0, mapbuffer ]:
                for possible in (name,name+'OES'):
                    try:
                        setattr( self, name, getattr( source, possible ))
                    except AttributeError as err:
                        pass 
                    else:
                        found = True
                assert found, name
        if GLES3_3_0.glBufferData:
            self.available = True
Implementation.register()