From 397bc9e3614fb33c11e99cd9e68a2d613af2b34b Mon Sep 17 00:00:00 2001 From: lonkaars Date: Fri, 17 May 2024 18:54:43 +0200 Subject: move glUseProgram out of draw loop --- shader.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'shader.c') 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; -- cgit v1.2.3