fbo

What is the best way to handle FBOs in OpenGL?

删除回忆录丶 提交于 2019-11-28 17:59:03
I wonder since a long time what would be the best way to handle OpenGL FrameBuffer Objects (FBO). Switching FBOs can be costly but defining new attachments too. How do you do it fast ? I hesitate between these 3: 1 FBO for everything, change attachment but don't switch between FBOs 1 FBO for each render target (size + format) in the rendering path. That means i will reuse the same FBO for similar render targets. But this way a custom blur would cost 4+ FBOs. 1 FBO for each render target, set attachments only once and then switch between FBOs Also, should I minimize the number of FBO switches

Rendering to cube map

ぐ巨炮叔叔 提交于 2019-11-28 05:33:23
According to ARB_geometry_shader4 it is possible to render a scene onto the 6 faces of a cube map with a geometry shader and the cube map attached to a framebuffer object. I want to create a shadow map using this way. However there seems to be a conflict that I can't resolve: I can only attach a texture with GL_DEPTH_COMPONENT as internal type to the GL_DEPTH_ATTACHMENT_EXT. A depth texture can only be 1D or 2D. If I want to attach a cube map, all other attached textures must be cube maps as well. So it looks like I can't use any depth testing when I want to render to a cube map. Or what

What is the best way to handle FBOs in OpenGL?

风格不统一 提交于 2019-11-27 10:57:43
问题 I wonder since a long time what would be the best way to handle OpenGL FrameBuffer Objects (FBO). Switching FBOs can be costly but defining new attachments too. How do you do it fast ? I hesitate between these 3: 1 FBO for everything, change attachment but don't switch between FBOs 1 FBO for each render target (size + format) in the rendering path. That means i will reuse the same FBO for similar render targets. But this way a custom blur would cost 4+ FBOs. 1 FBO for each render target, set

Rendering to cube map

蹲街弑〆低调 提交于 2019-11-27 05:34:20
问题 According to ARB_geometry_shader4 it is possible to render a scene onto the 6 faces of a cube map with a geometry shader and the cube map attached to a framebuffer object. I want to create a shadow map using this way. However there seems to be a conflict that I can't resolve: I can only attach a texture with GL_DEPTH_COMPONENT as internal type to the GL_DEPTH_ATTACHMENT_EXT. A depth texture can only be 1D or 2D. If I want to attach a cube map, all other attached textures must be cube maps as