File: uniform_buffer_object.py

package info (click to toggle)
pyopengl 3.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 6,140 kB
  • sloc: python: 26,428; makefile: 2
file content (128 lines) | stat: -rw-r--r-- 7,503 bytes parent folder | download | duplicates (2)
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
'''OpenGL extension ARB.uniform_buffer_object

Automatically generated by the get_gl_extensions script, do not edit!
'''
from OpenGL import platform, constants, constant, arrays
from OpenGL import extensions
from OpenGL.GL import glget
import ctypes
EXTENSION_NAME = 'GL_ARB_uniform_buffer_object'
_DEPRECATED = False
GL_UNIFORM_BUFFER = constant.Constant( 'GL_UNIFORM_BUFFER', 0x8A11 )
GL_UNIFORM_BUFFER_BINDING = constant.Constant( 'GL_UNIFORM_BUFFER_BINDING', 0x8A28 )
glget.addGLGetConstant( GL_UNIFORM_BUFFER_BINDING, (1,) )
GL_UNIFORM_BUFFER_START = constant.Constant( 'GL_UNIFORM_BUFFER_START', 0x8A29 )
GL_UNIFORM_BUFFER_SIZE = constant.Constant( 'GL_UNIFORM_BUFFER_SIZE', 0x8A2A )
GL_MAX_VERTEX_UNIFORM_BLOCKS = constant.Constant( 'GL_MAX_VERTEX_UNIFORM_BLOCKS', 0x8A2B )
glget.addGLGetConstant( GL_MAX_VERTEX_UNIFORM_BLOCKS, (1,) )
GL_MAX_GEOMETRY_UNIFORM_BLOCKS = constant.Constant( 'GL_MAX_GEOMETRY_UNIFORM_BLOCKS', 0x8A2C )
glget.addGLGetConstant( GL_MAX_GEOMETRY_UNIFORM_BLOCKS, (1,) )
GL_MAX_FRAGMENT_UNIFORM_BLOCKS = constant.Constant( 'GL_MAX_FRAGMENT_UNIFORM_BLOCKS', 0x8A2D )
glget.addGLGetConstant( GL_MAX_FRAGMENT_UNIFORM_BLOCKS, (1,) )
GL_MAX_COMBINED_UNIFORM_BLOCKS = constant.Constant( 'GL_MAX_COMBINED_UNIFORM_BLOCKS', 0x8A2E )
glget.addGLGetConstant( GL_MAX_COMBINED_UNIFORM_BLOCKS, (1,) )
GL_MAX_UNIFORM_BUFFER_BINDINGS = constant.Constant( 'GL_MAX_UNIFORM_BUFFER_BINDINGS', 0x8A2F )
glget.addGLGetConstant( GL_MAX_UNIFORM_BUFFER_BINDINGS, (1,) )
GL_MAX_UNIFORM_BLOCK_SIZE = constant.Constant( 'GL_MAX_UNIFORM_BLOCK_SIZE', 0x8A30 )
glget.addGLGetConstant( GL_MAX_UNIFORM_BLOCK_SIZE, (1,) )
GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS = constant.Constant( 'GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS', 0x8A31 )
glget.addGLGetConstant( GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS, (1,) )
GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS = constant.Constant( 'GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS', 0x8A32 )
glget.addGLGetConstant( GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS, (1,) )
GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS = constant.Constant( 'GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS', 0x8A33 )
glget.addGLGetConstant( GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS, (1,) )
GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT = constant.Constant( 'GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT', 0x8A34 )
glget.addGLGetConstant( GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT, (1,) )
GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH = constant.Constant( 'GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH', 0x8A35 )
GL_ACTIVE_UNIFORM_BLOCKS = constant.Constant( 'GL_ACTIVE_UNIFORM_BLOCKS', 0x8A36 )
GL_UNIFORM_TYPE = constant.Constant( 'GL_UNIFORM_TYPE', 0x8A37 )
GL_UNIFORM_SIZE = constant.Constant( 'GL_UNIFORM_SIZE', 0x8A38 )
GL_UNIFORM_NAME_LENGTH = constant.Constant( 'GL_UNIFORM_NAME_LENGTH', 0x8A39 )
GL_UNIFORM_BLOCK_INDEX = constant.Constant( 'GL_UNIFORM_BLOCK_INDEX', 0x8A3A )
GL_UNIFORM_OFFSET = constant.Constant( 'GL_UNIFORM_OFFSET', 0x8A3B )
GL_UNIFORM_ARRAY_STRIDE = constant.Constant( 'GL_UNIFORM_ARRAY_STRIDE', 0x8A3C )
GL_UNIFORM_MATRIX_STRIDE = constant.Constant( 'GL_UNIFORM_MATRIX_STRIDE', 0x8A3D )
GL_UNIFORM_IS_ROW_MAJOR = constant.Constant( 'GL_UNIFORM_IS_ROW_MAJOR', 0x8A3E )
GL_UNIFORM_BLOCK_BINDING = constant.Constant( 'GL_UNIFORM_BLOCK_BINDING', 0x8A3F )
GL_UNIFORM_BLOCK_DATA_SIZE = constant.Constant( 'GL_UNIFORM_BLOCK_DATA_SIZE', 0x8A40 )
GL_UNIFORM_BLOCK_NAME_LENGTH = constant.Constant( 'GL_UNIFORM_BLOCK_NAME_LENGTH', 0x8A41 )
GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS = constant.Constant( 'GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS', 0x8A42 )
GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES = constant.Constant( 'GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES', 0x8A43 )
GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER = constant.Constant( 'GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER', 0x8A44 )
GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER = constant.Constant( 'GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER', 0x8A45 )
GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER = constant.Constant( 'GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER', 0x8A46 )
GL_INVALID_INDEX = constant.Constant( 'GL_INVALID_INDEX', 0xFFFFFFFF )
glGetUniformIndices = platform.createExtensionFunction( 
'glGetUniformIndices',dll=platform.GL,
extension=EXTENSION_NAME,
resultType=None, 
argTypes=(constants.GLuint,constants.GLsizei,ctypes.POINTER( ctypes.POINTER( constants.GLchar )),arrays.GLuintArray,),
doc='glGetUniformIndices(GLuint(program), GLsizei(uniformCount), POINTER( ctypes.POINTER( constants.GLchar ))(uniformNames), GLuintArray(uniformIndices)) -> None',
argNames=('program','uniformCount','uniformNames','uniformIndices',),
deprecated=_DEPRECATED,
)

glGetActiveUniformsiv = platform.createExtensionFunction( 
'glGetActiveUniformsiv',dll=platform.GL,
extension=EXTENSION_NAME,
resultType=None, 
argTypes=(constants.GLuint,constants.GLsizei,arrays.GLuintArray,constants.GLenum,arrays.GLintArray,),
doc='glGetActiveUniformsiv(GLuint(program), GLsizei(uniformCount), GLuintArray(uniformIndices), GLenum(pname), GLintArray(params)) -> None',
argNames=('program','uniformCount','uniformIndices','pname','params',),
deprecated=_DEPRECATED,
)

glGetActiveUniformName = platform.createExtensionFunction( 
'glGetActiveUniformName',dll=platform.GL,
extension=EXTENSION_NAME,
resultType=None, 
argTypes=(constants.GLuint,constants.GLuint,constants.GLsizei,arrays.GLsizeiArray,arrays.GLcharArray,),
doc='glGetActiveUniformName(GLuint(program), GLuint(uniformIndex), GLsizei(bufSize), GLsizeiArray(length), GLcharArray(uniformName)) -> None',
argNames=('program','uniformIndex','bufSize','length','uniformName',),
deprecated=_DEPRECATED,
)

glGetUniformBlockIndex = platform.createExtensionFunction( 
'glGetUniformBlockIndex',dll=platform.GL,
extension=EXTENSION_NAME,
resultType=constants.GLuint, 
argTypes=(constants.GLuint,arrays.GLcharArray,),
doc='glGetUniformBlockIndex(GLuint(program), GLcharArray(uniformBlockName)) -> constants.GLuint',
argNames=('program','uniformBlockName',),
deprecated=_DEPRECATED,
)

glGetActiveUniformBlockiv = platform.createExtensionFunction( 
'glGetActiveUniformBlockiv',dll=platform.GL,
extension=EXTENSION_NAME,
resultType=None, 
argTypes=(constants.GLuint,constants.GLuint,constants.GLenum,arrays.GLintArray,),
doc='glGetActiveUniformBlockiv(GLuint(program), GLuint(uniformBlockIndex), GLenum(pname), GLintArray(params)) -> None',
argNames=('program','uniformBlockIndex','pname','params',),
deprecated=_DEPRECATED,
)

glGetActiveUniformBlockName = platform.createExtensionFunction( 
'glGetActiveUniformBlockName',dll=platform.GL,
extension=EXTENSION_NAME,
resultType=None, 
argTypes=(constants.GLuint,constants.GLuint,constants.GLsizei,arrays.GLsizeiArray,arrays.GLcharArray,),
doc='glGetActiveUniformBlockName(GLuint(program), GLuint(uniformBlockIndex), GLsizei(bufSize), GLsizeiArray(length), GLcharArray(uniformBlockName)) -> None',
argNames=('program','uniformBlockIndex','bufSize','length','uniformBlockName',),
deprecated=_DEPRECATED,
)

glUniformBlockBinding = platform.createExtensionFunction( 
'glUniformBlockBinding',dll=platform.GL,
extension=EXTENSION_NAME,
resultType=None, 
argTypes=(constants.GLuint,constants.GLuint,constants.GLuint,),
doc='glUniformBlockBinding(GLuint(program), GLuint(uniformBlockIndex), GLuint(uniformBlockBinding)) -> None',
argNames=('program','uniformBlockIndex','uniformBlockBinding',),
deprecated=_DEPRECATED,
)


def glInitUniformBufferObjectARB():
    '''Return boolean indicating whether this extension is available'''
    return extensions.hasGLExtension( EXTENSION_NAME )