PDA

View Full Version : Binding a VBO to a FBO



ToolTech
09-01-2005, 10:15 AM
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 ?

yooyo
09-01-2005, 10:50 AM
Create PBO buffer
Create FBO (rgba32f if you need full precission)
Render to FBO
Readback to PBO
Rebind PBO as VBO

yooyo

ToolTech
09-01-2005, 10:55 AM
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..

yooyo
09-01-2005, 01:05 PM
Yep.. swizling can be done by fragment shader. Framebuffer data will be copied to another part of GPU memory (PBO memory).

yooyo