Results 1 to 4 of 4

Thread: Problems using OpenGL-Framebuffer

  1. #1
    Junior Member
    Join Date
    Oct 2009

    Problems using OpenGL-Framebuffer

    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:
    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.
    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:
    Code :
    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,


  2. #2
    Senior Member
    Join Date
    Jul 2009
    Northern Europe

    Re: Problems using OpenGL-Framebuffer

    I'm not sure if you can access the framebuffer directly. I've mostly seen people write to an image that is shared between CL and GL and then use GL to draw that image. You can take a look at some of Apple's sample code that does CL/GL interaction to get some hints.

  3. #3
    Junior Member
    Join Date
    Oct 2009

    Re: Problems using OpenGL-Framebuffer

    Hi dbs2,

    Thats what I saw too (for example in the NVIDIA OpenCL SDK). But it is a detour as they do it!

  4. #4
    Junior Member
    Join Date
    Oct 2009

    some further researches

    GL Renderbuffers are different from Framebuffers.
    I also noticed that Renderbuffers are mentioned in the OpenCL 3.x Specification, but NOT in the 2.1 Specification.
    So GL Renderbuffer Sharing is only possible with OpenGL 3.x I think.

Similar Threads

  1. Problems with EGL / OpenGL ES 2.0 on Radeon Catalyst 11.9
    By gex2k11 in forum OpenGL ES general technical discussions
    Replies: 0
    Last Post: 11-09-2011, 02:58 AM
  2. problems with texturing - OpenGL ES on Symbian
    By miranda2112 in forum OpenGL ES general technical discussions
    Replies: 0
    Last Post: 03-20-2005, 01:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts