OpenCL Runtime: OpenGL Interoperability¶
Functionality in this section is only available when PyOpenCL is compiled
with GL support. See have_gl()
.
New in version 0.91.
-
pyopencl.
have_gl
()¶ Return True if PyOpenCL was compiled with OpenGL interoperability, otherwise False.
-
pyopencl.
get_gl_sharing_context_properties
()¶ Return a
list
ofcontext_properties
that will allow a newly created context to share the currently active GL context.
Get share group handle for current CGL context.
Apple OS X only.
New in version 2011.1.
-
class
pyopencl.
GLBuffer
(context, flags, bufobj)¶ GLBuffer
inherits fromMemoryObject
.-
gl_object
¶
-
-
class
pyopencl.
GLRenderBuffer
(context, flags, bufobj)¶ GLRenderBuffer
inherits fromMemoryObject
.-
gl_object
¶
-
-
class
pyopencl.
GLTexture
(context, flags, texture_target, miplevel, texture, dims)¶ GLTexture
inherits fromImage
. Only available in OpenCL 1.2 and newer.-
gl_object
¶
-
-
pyopencl.
enqueue_acquire_gl_objects
(queue, mem_objects, wait_for=None)¶ mem_objects is a list of
MemoryObject
instances. Returns a newpyopencl.Event
. wait_for may either be None or a list ofpyopencl.Event
instances for whose completion this command waits before starting exeuction.
-
pyopencl.
enqueue_release_gl_objects
(queue, mem_objects, wait_for=None)¶ mem_objects is a list of
MemoryObject
instances. Returns a newpyopencl.Event
. wait_for may either be None or a list ofpyopencl.Event
instances for whose completion this command waits before starting exeuction.
-
pyopencl.
get_gl_context_info_khr
(properties, param_name, platform=None)¶ Get information on which CL device corresponds to a given GL/EGL/WGL/CGL device.
See the
Context
constructor for the meaning of properties andgl_context_info
for param_name.Changed in version 2011.2: Accepts the platform argument. Using platform equal to None is deprecated as of PyOpenCL 2011.2.