Quantcast
Channel: Intel® Software - OpenCL*
Viewing all articles
Browse latest Browse all 1182

OpenGL interop on the CPU

$
0
0

Hi,

I try to use the clCreateFromGLTexture to do openGL interop with the CPU, but it seems that it failed.

Here is my code:

glGenTextures(1, _glTex);

//-- Texture
glBindTexture(GL_TEXTURE_2D, _glTex[0]);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, _width, _height, 0, GL_RGBA, GL_UNSIGNED_BYTE, 0);
glBindTexture(GL_TEXTURE_2D, 0);

_clTex0 = clCreateFromGLTexture(_oclContext, CL_MEM_READ_WRITE, GL_TEXTURE_2D, 0, _glTex[0], &error);

Does someone has an idea (For info it works fine with AMD SDK) !


Viewing all articles
Browse latest Browse all 1182

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>