[PyOpenCL] OpenGL interop on Mac OS X patch
Andreas Kloeckner
lists at informa.tiker.net
Thu Feb 17 07:14:05 PST 2011
On Thu, 17 Feb 2011 00:59:36 -0500, Ian Johnson <enjalot at gmail.com> wrote:
> My problem is that I use the Mac a lot, and PyOpenCL doesn't support OpenGL
> context sharing, so I decided to add it. I don't think my way of adding it
> is the cleanest, because I just added a #ifdef __APPLE__ in create_context
> which will go ahead and create from an OpenGL context if no devices are
> passed in (instead of using createContextFromType) as demonstrated in this
> pdf:
> http://sa10.idav.ucdavis.edu/docs/sa10-dg-opencl-gl-interop.pdf
>
> In my limited (and 1.0) experience the two cases on a mac are where you
> choose a device (either gpu or cpu) and don't share with GL, or you do this
> very specific command for creating from GL context (no other combination of
> standard createContext calls seem to work for GL sharing)
>
> I have attached my git diff (only a few lines in wrap_cl.hpp and
> gl_interop_demo.py) and the demo works on my mac!
I've reworked your patch a bit to make what is happening a bit more
explicit--can you please try my changes and report back?
> Also as a side note, when building from git doing
> git submodule init
> git submodule update
> did not seem to get all of the dependencies for pyopencl (it was missing
> ptr_container) so I manually pulled from bpl-subset.git and replaced the
> bpl-subset folder inside pyopencl
Should be fixed in git.
Thanks for your contribution!
Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.tiker.net/pipermail/pyopencl/attachments/20110217/643c03f5/attachment.pgp>
More information about the PyOpenCL
mailing list