Re: experimental "buffer" protocol array support in 3.1
"Mike C. Fletcher" <[email protected]> Mon, 24 Feb 2014 16:13:48 -0500
| Newsgroups | gmane.comp.python.opengl.user |
|---|---|
| Message-ID | <[email protected]> |
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
------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net