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:
Is it possible to use double-buffering and always manipulate the back-buffer and switch the buffers after that with glutSwapBuffers?1. Create OpenGL Context(e.g. glutInit)
2. initialize OpenCL with OpenGL Share Group for accessing OpenGL Context
3. Get the renderbuffer to manipulate it.
4. Display the renderbuffer.
Getting the OpenGL-Context is not the big problem for me; I don't understand the function to get the renderbuffer:
What do I insert for GLuint renderbuffer?Code :cl_mem clCreateFromGLRenderbuffer ( cl_context context, cl_mem_flags flags, GLuint renderbuffer, int *errcode_ret)
One last question(if the answer is no, I didn't understand anything ). Is the Renderbuffer the same as the Framebuffer?
Thanks for help,