Hi,
I’d like to access the OpenGL Framebuffer and don’t understand how to cope with that. I need the renderbuffer for writing to it and then display it.
I was thinking about doing it like this:
- Create OpenGL Context(e.g. glutInit)
- initialize OpenCL with OpenGL Share Group for accessing OpenGL Context
- Get the renderbuffer to manipulate it.
- Display the renderbuffer.
Is it possible to use double-buffering and always manipulate the back-buffer and switch the buffers after that with glutSwapBuffers?
Getting the OpenGL-Context is not the big problem for me; I don’t understand the function to get the renderbuffer:
cl_mem clCreateFromGLRenderbuffer (
cl_context context, cl_mem_flags flags,
GLuint renderbuffer, int *errcode_ret)
What do I insert for GLuint renderbuffer?
One last question(if the answer is no, I didn’t understand anything ;)). Is the Renderbuffer the same as the Framebuffer?
Thanks for help,
Moritz