OpenGL.GL.VERSION.GL_2_0
OpenGL extension VERSION.GL_2_0
This module customises the behaviour of the
OpenGL.raw.GL.VERSION.GL_2_0 to provide a more
Python-friendly API
The official definition of this extension is available here:
http://www.opengl.org/registry/specs/VERSION/GL_2_0.txt
Functions
glDrawBuffers(
n
= None
,
bufs
= None
)
glDrawBuffers( bufs ) -> bufs
Wrapper will calculate n from dims of bufs if only
one argument is provided...
glGetActiveUniform(
program
,
index
)
Retrieve the name, size and type of the uniform of the index in the program
glGetAttribLocation(
program
,
name
)
-> <class 'ctypes.c_int'>
Check that name is a string with a null byte at the end of it
glGetProgramInfoLog(
obj
)
Retrieve the shader program's error messages as a Python string
returns string which is '' if no message
glGetProgramiv(
program
,
pname
,
params
= None
)
Will automatically allocate params if not provided
glGetShaderInfoLog(
obj
)
Retrieve the shader's error messages as a Python string
returns string which is '' if no message
glGetShaderiv(
shader
,
pname
,
status
= None
)
Retrieve the integer parameter for the given shader
- shader
- shader ID to query
- pname
- parameter name
- status
- pointer to integer to receive status or None to return the parameter as an integer value
returns
integer if status parameter is None
status if status parameter is not None
glGetShaderSource(
obj
)
Retrieve the program/shader's source code as a Python string
returns string which is '' if no source code
glGetUniformLocation(
program
,
name
)
-> <class 'ctypes.c_int'>
Check that name is a string with a null byte at the end of it
glShaderSource(
shaderObj
,
string
)
glShaderSource( GLhandle(shaderObj),[bytes(string),...]) -> None
glVertexAttribPointer(
index
,
size
,
type
,
normalized
,
stride
,
pointer
)
Set an attribute pointer for a given shader (index)
- index
- the index of the generic vertex to bind, see glGetAttribLocation for retrieval of the value, note that index is a global variable, not per-shader
- size
- number of basic elements per record, 1,2,3, or 4
- type
- enum constant for data-type
- normalized
- whether to perform int to float normalization on integer-type values
- stride
- stride in machine units (bytes) between consecutive records, normally used to create "interleaved" arrays
- pointer
- data-pointer which provides the data-values, normally a vertex-buffer-object or offset into the same.
This implementation stores a copy of the data-pointer
in the contextdata structure in order to prevent null-
reference errors in the renderer.
Constants
GL_ACTIVE_ATTRIBUTE_MAX_LENGTH (35722)
GL_ACTIVE_ATTRIBUTES (35721)
GL_ACTIVE_UNIFORM_MAX_LENGTH (35719)
GL_ACTIVE_UNIFORMS (35718)
GL_ATTACHED_SHADERS (35717)
GL_BLEND_EQUATION_ALPHA (34877)
GL_BLEND_EQUATION_RGB (32777)
GL_BOOL (35670)
GL_BOOL_VEC2 (35671)
GL_BOOL_VEC3 (35672)
GL_BOOL_VEC4 (35673)
GL_COMPILE_STATUS (35713)
GL_COORD_REPLACE (34914)
GL_CURRENT_PROGRAM (35725)
GL_CURRENT_VERTEX_ATTRIB (34342)
GL_DELETE_STATUS (35712)
GL_DRAW_BUFFER0 (34853)
GL_DRAW_BUFFER1 (34854)
GL_DRAW_BUFFER10 (34863)
GL_DRAW_BUFFER11 (34864)
GL_DRAW_BUFFER12 (34865)
GL_DRAW_BUFFER13 (34866)
GL_DRAW_BUFFER14 (34867)
GL_DRAW_BUFFER15 (34868)
GL_DRAW_BUFFER2 (34855)
GL_DRAW_BUFFER3 (34856)
GL_DRAW_BUFFER4 (34857)
GL_DRAW_BUFFER5 (34858)
GL_DRAW_BUFFER6 (34859)
GL_DRAW_BUFFER7 (34860)
GL_DRAW_BUFFER8 (34861)
GL_DRAW_BUFFER9 (34862)
GL_FLOAT_MAT2 (35674)
GL_FLOAT_MAT3 (35675)
GL_FLOAT_MAT4 (35676)
GL_FLOAT_VEC2 (35664)
GL_FLOAT_VEC3 (35665)
GL_FLOAT_VEC4 (35666)
GL_FRAGMENT_SHADER (35632)
GL_FRAGMENT_SHADER_DERIVATIVE_HINT (35723)
GL_INFO_LOG_LENGTH (35716)
GL_INT_VEC2 (35667)
GL_INT_VEC3 (35668)
GL_INT_VEC4 (35669)
GL_LINK_STATUS (35714)
GL_LOWER_LEFT (36001)
GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS (35661)
GL_MAX_DRAW_BUFFERS (34852)
GL_MAX_FRAGMENT_UNIFORM_COMPONENTS (35657)
GL_MAX_TEXTURE_COORDS (34929)
GL_MAX_TEXTURE_IMAGE_UNITS (34930)
GL_MAX_VARYING_FLOATS (35659)
GL_MAX_VERTEX_ATTRIBS (34921)
GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS (35660)
GL_MAX_VERTEX_UNIFORM_COMPONENTS (35658)
GL_POINT_SPRITE (34913)
GL_POINT_SPRITE_COORD_ORIGIN (36000)
GL_SAMPLER_1D (35677)
GL_SAMPLER_1D_SHADOW (35681)
GL_SAMPLER_2D (35678)
GL_SAMPLER_2D_SHADOW (35682)
GL_SAMPLER_3D (35679)
GL_SAMPLER_CUBE (35680)
GL_SHADER_SOURCE_LENGTH (35720)
GL_SHADER_TYPE (35663)
GL_SHADING_LANGUAGE_VERSION (35724)
GL_STENCIL_BACK_FAIL (34817)
GL_STENCIL_BACK_FUNC (34816)
GL_STENCIL_BACK_PASS_DEPTH_FAIL (34818)
GL_STENCIL_BACK_PASS_DEPTH_PASS (34819)
GL_STENCIL_BACK_REF (36003)
GL_STENCIL_BACK_VALUE_MASK (36004)
GL_STENCIL_BACK_WRITEMASK (36005)
GL_UPPER_LEFT (36002)
GL_VALIDATE_STATUS (35715)
GL_VERTEX_ATTRIB_ARRAY_ENABLED (34338)
GL_VERTEX_ATTRIB_ARRAY_NORMALIZED (34922)
GL_VERTEX_ATTRIB_ARRAY_POINTER (34373)
GL_VERTEX_ATTRIB_ARRAY_SIZE (34339)
GL_VERTEX_ATTRIB_ARRAY_STRIDE (34340)
GL_VERTEX_ATTRIB_ARRAY_TYPE (34341)
GL_VERTEX_PROGRAM_POINT_SIZE (34370)
GL_VERTEX_PROGRAM_TWO_SIDE (34371)
GL_VERTEX_SHADER (35633)