blob: 389b03504211f9080a107eee314e99949f822e5a [file] [log] [blame]
<bridgehead>Lifetime of Shared Objects</bridgehead>
<!-- ext. spec p. 48 --> An OpenCL memory object created from an OpenGL object
(hereinafter refered to as a “shared CL/GL object”) remains valid as long as the
corresponding GL object has not been deleted. If the GL object is deleted through the GL
API (e.g. <function>glDeleteBuffers</function>, <function>glDeleteTextures</function>,
or <function>glDeleteRenderbuffers</function>), subsequent use of the CL buffer or image
object will result in undefined behavior, including but not limited to possible CL errors
and data corruption, but may not result in program termination.
<!-- ext. spec p. 48 --> The CL context and corresponding command-queues are dependent
on the existence of the GL share group object, or the share group associated with the
GL context from which the CL context is created. If the GL share group object or all GL
contexts in the share group are destroyed, any use of the CL context or command-queue(s)
will result in undefined behavior, which may include program termination. Applications
should destroy the CL command-queue(s) and CL context before destroying the corresponding
GL share group or contexts.
<!-- 16-Oct-2011 -->