diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2022-09-17 11:17:38 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-09-17 11:17:47 +0300 |
commit | 1810b1e4c88191e3578518e12f9f3d318e08dc60 (patch) | |
tree | ae868919ad9d4bfd32867ebef1088eb24cefa683 /source/blender/gpu/GPU_framebuffer.h | |
parent | b37954d03c5de2b131a35fbb4088e8dbf3f4ba2f (diff) |
GL: Framebuffer: Add support for empty framebuffer (no attachments)
This allows to reduce the memory footprint of very large framebuffers if
there is no need for any attachment.
Diffstat (limited to 'source/blender/gpu/GPU_framebuffer.h')
-rw-r--r-- | source/blender/gpu/GPU_framebuffer.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/gpu/GPU_framebuffer.h b/source/blender/gpu/GPU_framebuffer.h index 70ec7c19e7c..bdb384c16f1 100644 --- a/source/blender/gpu/GPU_framebuffer.h +++ b/source/blender/gpu/GPU_framebuffer.h @@ -189,6 +189,12 @@ void GPU_framebuffer_texture_layer_attach( void GPU_framebuffer_texture_cubeface_attach( GPUFrameBuffer *fb, GPUTexture *tex, int slot, int face, int mip); +/** + * Default size is used if the framebuffer contains no attachments. + * It needs to be re-specified each time an attachment is added. + */ +void GPU_framebuffer_default_size(GPUFrameBuffer *gpu_fb, int width, int height); + /* Frame-buffer operations. */ /** |