diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-09-03 22:52:30 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-09-05 18:49:14 +0300 |
commit | db21c12abedd7606a3aaf50f70e506a24d9f0e7a (patch) | |
tree | 31b928b9a14f8b801a1d792c5dcd1825855b30b7 /source/blender/gpu/GPU_framebuffer.h | |
parent | 22a84a673a9fd9942b54a584cbbbab5d0861cbd5 (diff) |
GPUFramebuffer: Encapsulate single attachement clear
This is in preparation of using it to clear single texture.
Also includes minor cleanups about not using tex target in
assert and adding enum operators.
Diffstat (limited to 'source/blender/gpu/GPU_framebuffer.h')
-rw-r--r-- | source/blender/gpu/GPU_framebuffer.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/source/blender/gpu/GPU_framebuffer.h b/source/blender/gpu/GPU_framebuffer.h index aca7156fa5b..f4599ac44bb 100644 --- a/source/blender/gpu/GPU_framebuffer.h +++ b/source/blender/gpu/GPU_framebuffer.h @@ -32,6 +32,14 @@ #include "GPU_texture.h" +typedef enum eGPUFrameBufferBits { + GPU_COLOR_BIT = (1 << 0), + GPU_DEPTH_BIT = (1 << 1), + GPU_STENCIL_BIT = (1 << 2), +} eGPUFrameBufferBits; + +ENUM_OPERATORS(eGPUFrameBufferBits) + #ifdef __cplusplus extern "C" { #endif @@ -41,12 +49,6 @@ typedef struct GPUAttachment { int layer, mip; } GPUAttachment; -typedef enum eGPUFrameBufferBits { - GPU_COLOR_BIT = (1 << 0), - GPU_DEPTH_BIT = (1 << 1), - GPU_STENCIL_BIT = (1 << 2), -} eGPUFrameBufferBits; - typedef enum eGPUBackBuffer { GPU_BACKBUFFER_LEFT = 0, GPU_BACKBUFFER_RIGHT, |