aboutsummaryrefslogtreecommitdiff
path: root/shader.c
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2024-05-17 18:54:43 +0200
committerlonkaars <loek@pipeframe.xyz>2024-05-17 18:54:43 +0200
commit397bc9e3614fb33c11e99cd9e68a2d613af2b34b (patch)
treee5c98f259b37cc88d112d1a1d39f5bd49166e435 /shader.c
parentb26c977ff0292c81c29ff007b171c9727e620cb4 (diff)
move glUseProgram out of draw loop
Diffstat (limited to 'shader.c')
-rw-r--r--shader.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/shader.c b/shader.c
index 321439a..6831b28 100644
--- a/shader.c
+++ b/shader.c
@@ -40,7 +40,11 @@ GLuint link_shaders(GLuint vert, GLuint frag) {
glAttachShader(shader, vert);
glAttachShader(shader, frag);
glLinkProgram(shader);
+
check_program(shader);
+
+ glUseProgram(shader);
+
glDeleteShader(vert);
glDeleteShader(frag);
return shader;