File: performance_monitor.py

package info (click to toggle)
pyopengl 3.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 6,936 kB
  • ctags: 9,720
  • sloc: python: 49,408; makefile: 3
file content (53 lines) | stat: -rw-r--r-- 2,250 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
'''Autogenerated by get_gl_extensions script, do not edit!'''
from OpenGL import platform as _p, constants as _cs, arrays
from OpenGL.GL import glget
import ctypes
EXTENSION_NAME = 'GL_AMD_performance_monitor'
def _f( function ):
    return _p.createFunction( function,_p.GL,'GL_AMD_performance_monitor',False)
_p.unpack_constants( """GL_COUNTER_TYPE_AMD 0x8BC0
GL_COUNTER_RANGE_AMD 0x8BC1
GL_UNSIGNED_INT64_AMD 0x8BC2
GL_PERCENTAGE_AMD 0x8BC3
GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4
GL_PERFMON_RESULT_SIZE_AMD 0x8BC5
GL_PERFMON_RESULT_AMD 0x8BC6""", globals())
@_f
@_p.types(None,arrays.GLintArray,_cs.GLsizei,arrays.GLuintArray)
def glGetPerfMonitorGroupsAMD( numGroups,groupsSize,groups ):pass
@_f
@_p.types(None,_cs.GLuint,arrays.GLintArray,arrays.GLintArray,_cs.GLsizei,arrays.GLuintArray)
def glGetPerfMonitorCountersAMD( group,numCounters,maxActiveCounters,counterSize,counters ):pass
@_f
@_p.types(None,_cs.GLuint,_cs.GLsizei,arrays.GLsizeiArray,arrays.GLcharArray)
def glGetPerfMonitorGroupStringAMD( group,bufSize,length,groupString ):pass
@_f
@_p.types(None,_cs.GLuint,_cs.GLuint,_cs.GLsizei,arrays.GLsizeiArray,arrays.GLcharArray)
def glGetPerfMonitorCounterStringAMD( group,counter,bufSize,length,counterString ):pass
@_f
@_p.types(None,_cs.GLuint,_cs.GLuint,_cs.GLenum,ctypes.c_void_p)
def glGetPerfMonitorCounterInfoAMD( group,counter,pname,data ):pass
@_f
@_p.types(None,_cs.GLsizei,arrays.GLuintArray)
def glGenPerfMonitorsAMD( n,monitors ):pass
@_f
@_p.types(None,_cs.GLsizei,arrays.GLuintArray)
def glDeletePerfMonitorsAMD( n,monitors ):pass
@_f
@_p.types(None,_cs.GLuint,_cs.GLboolean,_cs.GLuint,_cs.GLint,arrays.GLuintArray)
def glSelectPerfMonitorCountersAMD( monitor,enable,group,numCounters,counterList ):pass
@_f
@_p.types(None,_cs.GLuint)
def glBeginPerfMonitorAMD( monitor ):pass
@_f
@_p.types(None,_cs.GLuint)
def glEndPerfMonitorAMD( monitor ):pass
@_f
@_p.types(None,_cs.GLuint,_cs.GLenum,_cs.GLsizei,arrays.GLuintArray,arrays.GLintArray)
def glGetPerfMonitorCounterDataAMD( monitor,pname,dataSize,data,bytesWritten ):pass


def glInitPerformanceMonitorAMD():
    '''Return boolean indicating whether this extension is available'''
    from OpenGL import extensions
    return extensions.hasGLExtension( EXTENSION_NAME )