From 636bf3db7a9ec668edc37b74c751427468073f31 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner <inform@tiker.net> Date: Thu, 17 Feb 2011 10:07:01 -0500 Subject: [PATCH] A few fixes to GL interop support. (not yet working again) --- bpl-subset | 2 +- doc/source/runtime.rst | 6 ++++++ examples/gl_interop_demo.py | 6 +++--- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/bpl-subset b/bpl-subset index fe17a857..19b13cae 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 d301f440..35774022 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 f65c3ef0..3a18c648 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) -- GitLab