Skip to content
Snippets Groups Projects
Commit 636bf3db authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

A few fixes to GL interop support. (not yet working again)

parent 16a5b304
No related branches found
No related tags found
No related merge requests found
bpl-subset @ 19b13cae
Subproject commit fe17a8572ec0fe5bec36460f4e5ec712c269a502 Subproject commit 19b13cae1f63e75dbf18b90020e4877639ab9f0e
...@@ -710,6 +710,12 @@ with GL support. See :func:`have_gl`. ...@@ -710,6 +710,12 @@ with GL support. See :func:`have_gl`.
Return *True* if PyOpenCL was compiled with OpenGL interoperability, otherwise *False*. 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() .. function:: get_apple_cgl_share_group()
Get share group handle for current CGL context. Get share group handle for current CGL context.
......
...@@ -24,9 +24,9 @@ def initialize(): ...@@ -24,9 +24,9 @@ def initialize():
plats = cl.get_platforms() plats = cl.get_platforms()
from pyopencl.tools import get_gl_sharing_context_properties from pyopencl.tools import get_gl_sharing_context_properties
ctx = cl.Context(properties=props ctx = cl.Context(properties=[
[(ctx_props.PLATFORM, plats[0])] (cl.context_properties.PLATFORM, plats[0])]
+ get_gl_sharing_context_properties()) + get_gl_sharing_context_properties())
glClearColor(1, 1, 1, 1) glClearColor(1, 1, 1, 1)
glColor(0, 0, 1) glColor(0, 0, 1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment