Rendering to texture - without clearing scene
Hi,
I'm trying to render a small amount of quads to a texture, without rendering the whole scene to the same texture. BUT - only way I've found to achieve this, is to follow this procedure:
1. Copy the current content of the drawing buffer either to a texture, or using accumulation buffer
2. Clear the scene
3. Render the quad(s) to the buffer
4. Copy the content of the buffer to a texture
5. Re-render the original scene using the copy from #1
but needless to say, this involves a lot of (seemingly) un-neccesary and costful operations (mainly step #1, #2 and #5. There HAS to be some better way to achieve this? I have been looking into using framebuffer objects, and although it seems quite like something I could use, my current graphics card are pretty little exciting (and is missing the framebuffer_object extension).
Any hints? :)
Thanks in advance!
Best regards,
Hallgeir
If your card doesn't have the GL_EXT_framebuffer_object extension, you can't do things the easy way, but you may be able to do them the hard way. Do you have the WGL_ARB_pbuffer extension? (Note: You'll need to get that using the wglGetExtensionsStringARB func.)
I'm guessing the WGL_* stuff are windows specific? Because I have no WGL_ extensions (I use Linux (more accurately, Ubuntu 9.04)). I do however have support for a bunch of GLX_ extensions, among those, the GLX_SGIX_pbuffer extension. Can I assume that it is the same as the WGL_EXT_pbuffer extension?
Quote:Original post by hallgeirIt's the same inasmuch as it does the same sort of thing and is similarly painful compared to FBOs, yes. [grin] That's what you'll want to play with. It's basically a way to create a wholly separate GLX context, one which draws into something that can become a texture directly, with no copying.
I do however have support for a bunch of GLX_ extensions, among those, the GLX_SGIX_pbuffer extension. Can I assume that it is the same as the WGL_EXT_pbuffer extension?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement