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.
This commit is contained in:
2020-09-03 21:52:30 +02:00
parent 22a84a673a
commit db21c12abe
5 changed files with 60 additions and 14 deletions

View File

@@ -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,