Re: [PyOpenGL-Users] experimental "buffer" protocol array support in 3.1
Brought to you by:
mcfletch
|
From: Mike C. F. <mcf...@vr...> - 2014-02-24 21:13:56
|
On 14-02-24 10:36 AM, Antoine Martin wrote:
> Hi,
>
> Can you expand on this new buffer protocol? Is worth using yet?
At the moment it's only registered for __builtin__.memoryview and
__builtin__.bytearray objects. Internally it uses memoryview on the
buffer-api supporting objects, and the <buffer> object doesn't *seem* to
be compatible (?? weird). If you can get your buffer object into a
buffer-api supporting object (something you can call memoryview() on)
you should be able to pass it into the APIs.
As for testing for support,
if OpenGL.version.__version__.split('.')[:2] >= ['3','1']:
then you should have the buffer api handler.
Hope that helps,
Mike
--
________________________________________________
Mike C. Fletcher
Designer, VR Plumber, Coder
http://www.vrplumber.com
http://blog.vrplumber.com
|