add texture_quad_batch assertion

This commit is contained in:
sam 2024-05-03 11:23:24 +12:00
parent 8cbe81177b
commit e50d043952

View file

@ -2,6 +2,7 @@
#include <stb_image.h>
#include <opengl.h>
#include <stdio.h>
#include <assert.h>
RenderBatch* texture_quad_batch = NULL;
int max_textures;
@ -39,6 +40,7 @@ uint32_t load_texture(const char* path) {
}
void draw_texture(uint32_t id, vec3 pos, vec4 color) {
assert(texture_quad_batch != NULL && "texture_quad_batch is null, was setup_textures() called?");
batch_draw_texture(texture_quad_batch, id, pos, color);
}