I'm trying to use an interop with opengl and opencl in qt.
this is my code:
I get always the same error:Code :GLuint id = 0; glGenBuffers(1, &id); glBindBuffer(GL_ARRAY_BUFFER, id); glBufferData(GL_ARRAY_BUFFER, lSize, NULL, GL_STATIC_DRAW); int err; cl::BufferGL buff; buff= cl::BufferGL(context, CL_MEM_WRITE_ONLY, id, &err); glBindBuffer(GL_ARRAY_BUFFER, 0); vertexBufferObject = id;
i omitted the construction of the gl/cl context code, but I'm was try this without qt and all works fine.
When i use the code in qt i get the error.
What can be?
the threads and contexts that are used in qt?
How i can resolve?
But I wish understand and use my own library, rather than use an already done library .