I startet experimenting with OpenCL. First tests are done. Now I am trying to check out Interoperability with OpenGL. I want to manipulate an OpenGL Buffer directly.. I'm working with jogamp jocl: http://jogamp.org/jocl/www/.
They offer examples and I'm especially interested in this one: https://github.com/mbien/jocl-demos/tre ... oglinterop
Unfortunately I get errors whenever they try to create a CL Buffer from a GL Buffer:
Code :clBuffer = clContext.createFromGLBuffer(glObjects[VERTICES], BUFFER_SIZE, CLGLBuffer.Mem.WRITE_ONLY);
glObjects[VERTICES] contains a valid opengl bufferId which was initialized as follows:
Code :gl.glGenBuffers(glObjects.length, glObjects, 0); gl.glEnableClientState(GL2.GL_VERTEX_ARRAY); gl.glBindBuffer(GL2.GL_ARRAY_BUFFER, glObjects[VERTICES]); gl.glBufferData(GL2.GL_ARRAY_BUFFER, BUFFER_SIZE, null, GL2.GL_DYNAMIC_DRAW); gl.glBindBuffer(GL2.GL_ARRAY_BUFFER, 0); gl.glDisableClientState(GL2.GL_VERTEX_ARRAY);
Does anyone know what could be the problem? Is this maybe a hardware limitation?
There is a compatibility check in the code which passes:
Code :... d.isGLMemorySharingSupported() ...
I am using this SDK: http://developer.amd.com/sdks/AMDAPPSDK ... fault.aspx and the newest jogamp version (tried other versions already)
Does anyone know what's wrong?