5,321
edits
Line 262: | Line 262: | ||
==OpenGL Interop== | ==OpenGL Interop== | ||
===Textures=== | |||
See [https://software.intel.com/content/www/us/en/develop/articles/opencl-and-opengl-interoperability-tutorial.html OpenCL™ and OpenGL* Interoperability Tutoria]. | See [https://software.intel.com/content/www/us/en/develop/articles/opencl-and-opengl-interoperability-tutorial.html OpenCL™ and OpenGL* Interoperability Tutoria]. | ||
Line 267: | Line 269: | ||
Note that <code>cl::Image</code> and <code>cl::Buffer</code> are not the same thing. A buffer is a contiguous section of memory whereas an image is a mipmapped texture. Interchanging them will result in <code>CL_INVALID_MEM_OBJECT</code> errors or similar. | Note that <code>cl::Image</code> and <code>cl::Buffer</code> are not the same thing. A buffer is a contiguous section of memory whereas an image is a mipmapped texture. Interchanging them will result in <code>CL_INVALID_MEM_OBJECT</code> errors or similar. | ||
I recommend writing to a separate buffer and copying to images. | I recommend writing to a separate buffer and copying to images. | ||
===Buffers=== | |||
[https://web.engr.oregonstate.edu/~mjb/cs575/Handouts/opencl.opengl.vbo.1pp.pdf Oregon State VBO Interop] | |||
[https://github.khronos.org/OpenCL-CLHPP/classcl_1_1_buffer_g_l.html cl::BufferGL] | |||
==Advanced Topics== | ==Advanced Topics== | ||
====Local Memory v. Global Memory==== | ====Local Memory v. Global Memory==== |