OpenGL.arrays.numpybuffers
Buffer based Numpy plugin (not used)
This API is no more useful than the direct Numpy version, as Numpy already
gives us the details we need *when using the accelerator module* at a low
level, with very fast access. When using the non-accelerated version the
ctypes version *might* show some performance benefits, but it's not going
to be fast no matter what we do without C-level code.
Functions
Classes
class NumpyHandler(
BufferHandler
):
contiguous(
cls
,
source
,
typeCode
= None
)
Get contiguous array from source
- source
- numpy Python array (or compatible object) for use as the data source. If this is not a contiguous array of the given typeCode, a copy will be made, otherwise will just be returned unchanged.
- typeCode
- optional 1-character typeCode specifier for the numpy.array function.
All gl*Pointer calls should use contiguous arrays, as non-
contiguous arrays will be re-copied on every rendering pass.
Although this doesn't raise an error, it does tend to slow
down rendering.