summaryrefslogtreecommitdiff
path: root/text.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-08-06 15:24:55 -0400
committerpommicket <pommicket@gmail.com>2023-08-06 15:24:55 -0400
commit823815101f55ca0ce67f36867b93934ccdba1953 (patch)
tree2766bf1cf860245445e52aa4626b0005fb701e4d /text.c
parent52da64686fb506372fa09ab562915f895cd88cb9 (diff)
silence weird opengl warning
Diffstat (limited to 'text.c')
-rw-r--r--text.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/text.c b/text.c
index ba9212f..60bafd4 100644
--- a/text.c
+++ b/text.c
@@ -344,6 +344,12 @@ void text_render(Font *font) {
glUniform2f(text_u_window_size, gl_window_width, gl_window_height);
glDrawArrays(GL_TRIANGLES, 0, (GLsizei)(3 * ntriangles));
arr_clear(texture->triangles);
+ glBindTexture(GL_TEXTURE_2D, 0);
+
+ // if i remove this i get
+ // Texture state usage warning: The texture object (0) bound to texture image unit 0 does not have a defined base level and cannot be used for texture mapping
+ // (even with no other draw calls) which is really weird but whatever this is probably good practice anyways.
+ glUseProgram(0);
}
if (font->fallback) {