OpenGL.arrays.arrayhelpers
Helper functions for wrapping array-using operations
These are functions intended to be used in wrapping
GL functions that deal with OpenGL array data-types.
Functions
setInputArraySizeType(
baseOperation
,
size
,
type
,
argName
= 0
)
Decorate function with vector-handling code for a single argument
if OpenGL.ERROR_ON_COPY is False, then we return the
named argument, converting to the passed array type,
optionally checking that the array matches size.
if OpenGL.ERROR_ON_COPY is True, then we will dramatically
simplify this function, only wrapping if size is True, i.e.
only wrapping if we intend to do a size check on the array.
Classes
class AsArrayOfType(
PyConverter
):
Given arrayName and typeName coerce arrayName to array of type typeName
TODO: It should be possible to drop this if ERROR_ON_COPY,
as array inputs always have to be the final objects in that
case.
class AsArrayTyped(
PyConverter
):
Given arrayName and arrayType, convert arrayName to array of type
TODO: It should be possible to drop this if ERROR_ON_COPY,
as array inputs always have to be the final objects in that
case.
class AsArrayTypedSize(
CConverter
):
class storePointerType(
object
):
Store named pointer value in context indexed by constant
- pointerName
- named pointer argument
- constant
- constant used to index in the context storage
Note: OpenGL.STORE_POINTERS can be set with ERROR_ON_COPY
to ignore this storage operation.
Stores the pyArgs (i.e. result of pyConverters) for the named
pointer argument...