Home
Docs
Install
OpenGL
arrays
OpenGL.arrays.numbers
Numbers passed as array handling code for PyOpenGL
Classes
class
NumberHandler
(
FormatHandler
):
Allows the user to pass a bald Python float,int, etceteras as an array-of-1
arraySize
(
self ,
value ,
typeCode = None
)
Given a data-value, calculate ravelled size for the array
arrayToGLType
(
self ,
value
)
Given a value, guess OpenGL type of the corresponding pointer
asArray
(
self ,
value ,
typeCode = None
)
Convert given value to an array value of given typeCode
dataPointer
(
self ,
value ,
typeCode = None
)
If it's a ctypes value, pass on, otherwise do asArray
from_param
(
self ,
value ,
typeCode = None
)
If it's a ctypes value, pass on, otherwise do asArray
ones
(
self ,
dims ,
typeCode = None
)
Currently don't allow Number as output types!
registerEquivalent
(
self ,
typ ,
base
)
Register a sub-class for handling as the base-type
unitSize
(
self ,
value ,
typeCode = None
)
Determine unit size of an array (if possible)
zeros
(
self ,
dims ,
typeCode = None
)
Currently don't allow Number as output types!