

We also leverage the extension cl_khr_gl_event that is supported on Intel processor graphics.

The surface sharing extension is defined in the OpenCL extension specification with the string cl_khr_gl_sharing. The same recommendations apply to update to a vertex buffer or an off-screen framebuffer object that might be used in a non-interactive offline image processing pipeline. This sample demonstrates updating a texture using OpenCL that was created in OpenGL. This could be useful for color conversions, resampling, or performing compression in some scenarios. Finally, imagine post processing an image with OpenCL after rendering the scene using the 3D pipeline.

Another example might be a dynamically generated procedural texture created in OpenCL used as a texture when rendering a 3D object in the scene. In this case you wants access to the expressiveness of the OpenCL C kernel language for compute but the rendering capabilities of the OpenGL API for compatibility with your existing pipeline. One example use of this is for a real-time computer vision applications where we want to run a feature detector over an image in OpenCL but render the final output to the screen in real time with the detectors clearly marked. This example demonstrates the creation of a texture in OpenGL* 4.3 that has a sub-region updated by an OpenCL™ C kernel running on Intel® Processor Graphics with Microsoft Windows*. Download Sharing Surfaces Code Sample Zipfile Introduction
