| Previous: OpenGL.AGL | OpenGL. GL | Next: OpenGL.GL.AMD |
OpenGL. GL
OpenGL.GL, the core GL library and extensions to it
Functions
glAreTexturesResident(
*
args
)
-> <class 'ctypes.c_ubyte'>
Allow both Pythonic and C-style calls to glAreTexturesResident
glAreTexturesResident( arrays.GLuintArray( textures) )
or
glAreTexturesResident( int(n), arrays.GLuintArray( textures), arrays.GLuboolean( output) )
or
glAreTexturesResident( int(n), arrays.GLuintArray( textures) )
returns the output arrays.GLubooleanArray
glBufferData(
target
,
size
,
data
= None
,
usage
= None
)
Copy given data into the currently bound vertex-buffer-data object
- target
- the symbolic constant indicating which buffer type is intended
- size
- if provided, the count-in-bytes of the array
- data
- data-pointer to be used, may be None to initialize without copying over a data-set
- usage
- hint to the driver as to how to set up access to the buffer
Note: parameter "size" can be omitted, which makes the signature
glBufferData( target, data, usage )
instead of:
glBufferData( target, size, data, usage )
glBufferSubData(
target
,
offset
,
size
= None
,
data
= None
)
Copy subset of data into the currently bound vertex-buffer-data object
- target
- the symbolic constant indicating which buffer type is intended
- offset
- offset from beginning of buffer at which to copy bytes
- size
- the count-in-bytes of the array (if an int/long), if None, calculate size from data, if an array and data is None, use as data (i.e. the parameter can be omitted and calculated)
- data
- data-pointer to be used, may be None to initialize without copying over a data-set
Note that if size is not an int/long it is considered to be data
*iff* data is None
glCallLists(
lists
,
*
args
)
glCallLists( str( lists ) or lists[] ) -> None
Restricted version of glCallLists, takes a string or a GLuint compatible
array data-type and passes into the base function.
glCompressedTexImage2D(
target
,
level
,
internalformat
,
width
,
height
,
border
,
imageSize
,
data
)
glCompressedTexImage3D(
target
,
level
,
internalformat
,
width
,
height
,
depth
,
border
,
imageSize
,
data
)
glCompressedTexSubImage2D(
target
,
level
,
xoffset
,
yoffset
,
width
,
height
,
format
,
imageSize
,
data
)
glCompressedTexSubImage3D(
target
,
level
,
xoffset
,
yoffset
,
zoffset
,
width
,
height
,
depth
,
format
,
imageSize
,
data
)
glDrawBuffers(
n
= None
,
bufs
= None
)
glDrawBuffers( bufs ) -> bufs
Wrapper will calculate n from dims of bufs if only
one argument is provided...
glGenQueries(
n
,
ids
= None
)
Generate n queries, if ids is None, is allocated
returns array of ids
glGenTextures(
count
,
textures
= None
)
Generate count new texture names
Note: for compatibility with PyOpenGL 2.x and below,
a count of 1 will return a single integer, rather than
an array of integers.
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
glGetConvolutionFilter(
target
,
format
,
type
)
Retrieve 1 or 2D convolution parameter "kernels" as pixel data
glGetHistogram(
target
,
reset
,
format
,
type
,
values
= None
)
Retrieve current 1D histogram as a 1D bitmap
glGetMinmax(
target
,
reset
,
format
,
type
,
values
= None
)
Retrieve minimum and maximum values as a 2-element image
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
glGetSeparableFilter(
target
,
format
,
type
)
Retrieve 2 1D convolution parameter "kernels" as pixel data
glGetShaderInfoLog(
obj
)
Retrieve the shader's error messages as a Python string
returns string which is '' if no message
glGetShaderSource(
obj
)
Retrieve the program/shader's source code as a Python string
returns string which is '' if no source code
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
glGetUniformLocation(
program
,
name
)
-> <class 'ctypes.c_int'>
Check that name is a string with a null byte at the end of it
glTexImage3D(
target
,
level
,
internalformat
,
width
,
height
,
depth
,
border
,
format
,
type
,
pixels
)
glTexSubImage3D(
target
,
level
,
xoffset
,
yoffset
,
zoffset
,
width
,
height
,
depth
,
format
,
type
,
pixels
)
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.
| Previous: OpenGL.AGL | OpenGL. GL | Next: OpenGL.GL.AMD |