Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: Binding a VBO to a FBO

  1. #1
    Super Moderator Regular Contributor
    Join Date
    Jul 2001
    Posts
    425

    Binding a VBO to a FBO

    Excuse my novice question, but is there or will there be a way to render into a FBO that is mapped to a VBO and specify a swizzle so e.x. the rendering components r,g goes into the VBO x,z without going back to CPU mem ?

  2. #2
    Advanced Member Frequent Contributor yooyo's Avatar
    Join Date
    Apr 2003
    Location
    Belgrade, Serbia
    Posts
    883

    Re: Binding a VBO to a FBO

    Create PBO buffer
    Create FBO (rgba32f if you need full precission)
    Render to FBO
    Readback to PBO
    Rebind PBO as VBO

    yooyo

  3. #3
    Super Moderator Regular Contributor
    Join Date
    Jul 2001
    Posts
    425

    Re: Binding a VBO to a FBO

    ok. So the swizzle then can be made with ordinary GLSL and you are sure then the rendered data is never transferred to GPU mem..

    great news..

  4. #4
    Advanced Member Frequent Contributor yooyo's Avatar
    Join Date
    Apr 2003
    Location
    Belgrade, Serbia
    Posts
    883

    Re: Binding a VBO to a FBO

    Yep.. swizling can be done by fragment shader. Framebuffer data will be copied to another part of GPU memory (PBO memory).

    yooyo

Posting Permissions

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