We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi
In android, I created cl context from gl like this :
cl_context_properties props[] = { CL_GL_CONTEXT_KHR, eglGetCurrentContext(), CL_EGL_DISPLAY_KHR, eglGetCurrentDisplay(), CL_CONTEXT_PLATFORM, clplatform,0);
clCreateContext(props,1,&device,NULL,NULL,NULL);
and then create opengl texture, this texture can be used . After that , I want to use opencl to calculate this texture, so I do like this :
clCreateFromGLTexture2D(clContext, CL_MEM_READ_WRITE,GL_TEXTURE_2D, 0,texturename ,&errNum);
And this function failed, the errNum returned CL_INVALID_GL_OBJECT , and I do not know why , Can you help me ?
Thanks
Aren't your texture parameters supposed to be specified before you create the texture store ? I would validate that you are not getting GL errors. I've experience cases wherein if I did not have the call to set the texture parameters prior to calling glTexImage* I would end up getting an invalid texture.