diff --git a/bpl-subset b/bpl-subset index fe17a8572ec0fe5bec36460f4e5ec712c269a502..19b13cae1f63e75dbf18b90020e4877639ab9f0e 160000 --- a/bpl-subset +++ b/bpl-subset @@ -1 +1 @@ -Subproject commit fe17a8572ec0fe5bec36460f4e5ec712c269a502 +Subproject commit 19b13cae1f63e75dbf18b90020e4877639ab9f0e diff --git a/doc/source/runtime.rst b/doc/source/runtime.rst index d301f44032a99d901aac1f15ce2ea1471a76b729..357740222ebcb1563d2265eecf1b0613dbfc7220 100644 --- a/doc/source/runtime.rst +++ b/doc/source/runtime.rst @@ -710,6 +710,12 @@ with GL support. See :func:`have_gl`. Return *True* if PyOpenCL was compiled with OpenGL interoperability, otherwise *False*. +.. function:: get_gl_sharing_context_properties() + + Return a :class:`list` of :class:`context_properties` that will + allow a newly created context to share the currently active GL + context. + .. function:: get_apple_cgl_share_group() Get share group handle for current CGL context. diff --git a/examples/gl_interop_demo.py b/examples/gl_interop_demo.py index f65c3ef09def48f7da7aa7dc1b18a3fb1eebb65f..3a18c648095bb929751f076560f677bfdff6cdf3 100644 --- a/examples/gl_interop_demo.py +++ b/examples/gl_interop_demo.py @@ -24,9 +24,9 @@ def initialize(): plats = cl.get_platforms() from pyopencl.tools import get_gl_sharing_context_properties - ctx = cl.Context(properties=props - [(ctx_props.PLATFORM, plats[0])] - + get_gl_sharing_context_properties()) + ctx = cl.Context(properties=[ + (cl.context_properties.PLATFORM, plats[0])] + + get_gl_sharing_context_properties()) glClearColor(1, 1, 1, 1) glColor(0, 0, 1)