summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/rendering.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rendering.c b/src/rendering.c
index 01d6df1..0e6533f 100644
--- a/src/rendering.c
+++ b/src/rendering.c
@@ -827,7 +827,7 @@ void r_create_textures(void* restrict ctx, u32* restrict texture_array,
const GladGLContext* gl = (GladGLContext*)ctx;
i8 texture_dim = 2;
- u32 err = 0;
+ u32 err = gl->GetError();
ivec3 texture_sz;
ASSERT(texture_size != NULL);
glm_ivec3_copy(*texture_size, texture_sz);
@@ -839,6 +839,8 @@ void r_create_textures(void* restrict ctx, u32* restrict texture_array,
// Check that if texture_dim == 0 then texture_sz[0] > 0.
ASSERT(texture_sz[texture_dim] > 0);
+ ASSERT(!err);
+
switch (texture_dim) {
case 0:
gl->CreateTextures(GL_TEXTURE_1D, num_targets, texture_array);