diff options
| author | onelin <oscar@nelin.dk> | 2026-03-27 19:37:34 +0000 |
|---|---|---|
| committer | onelin <oscar@nelin.dk> | 2026-03-27 19:38:58 +0000 |
| commit | 0326c6080887f0988fe70c2f21dbde2ba576ece0 (patch) | |
| tree | 2438efd3477cb270bd7a83b1017ea050fb1d6616 | |
| parent | cb36e70127ac6bdfc8960fbddf545afcfbca1ce4 (diff) | |
Add INT32 texture color format
| -rw-r--r-- | src/include/daw/rendering.h | 2 | ||||
| -rw-r--r-- | src/rendering.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/include/daw/rendering.h b/src/include/daw/rendering.h index bebc60c..11d3611 100644 --- a/src/include/daw/rendering.h +++ b/src/include/daw/rendering.h @@ -247,6 +247,8 @@ typedef enum { #define BUFFERPARAMETER_FMT_RGB8 (2) #define BUFFERPARAMETER_FMT_SRGB8 (3) #define BUFFERPARAMETER_FMT_SRGBA8 (4) +#define BUFFERPARAMETER_FMT_INT32 (5) +#define BUFFERPARAMETER_FMT_UINT32 (6) // Depth & stencil format(s) #define BUFFERPARAMETER_FMT_DEPTH_STENCIL_MASK (MASK(3) << 10) diff --git a/src/rendering.c b/src/rendering.c index 71f3a75..5be77a5 100644 --- a/src/rendering.c +++ b/src/rendering.c @@ -813,6 +813,8 @@ static u32 gl_texture_format(u32 texture_format) { case BUFFERPARAMETER_FMT_RGB8: return GL_RGB8; case BUFFERPARAMETER_FMT_SRGB8: return GL_SRGB; case BUFFERPARAMETER_FMT_SRGBA8: return GL_SRGB8_ALPHA8; + case BUFFERPARAMETER_FMT_INT32: return GL_R32I; + case BUFFERPARAMETER_FMT_UINT32: return GL_R32UI; case BUFFERPARAMETER_FMT_DEPTH24_STENCIL8: return GL_DEPTH24_STENCIL8; case BUFFERPARAMETER_FMT_DEPTH16: return GL_DEPTH_COMPONENT16; |
