add texture_quad_batch assertion
This commit is contained in:
parent
8cbe81177b
commit
e50d043952
|
@ -2,6 +2,7 @@
|
||||||
#include <stb_image.h>
|
#include <stb_image.h>
|
||||||
#include <opengl.h>
|
#include <opengl.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
RenderBatch* texture_quad_batch = NULL;
|
RenderBatch* texture_quad_batch = NULL;
|
||||||
int max_textures;
|
int max_textures;
|
||||||
|
@ -39,6 +40,7 @@ uint32_t load_texture(const char* path) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void draw_texture(uint32_t id, vec3 pos, vec4 color) {
|
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);
|
batch_draw_texture(texture_quad_batch, id, pos, color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue