commit 1983cc4a5aa37baf9268c668958cd668569241fb
parent 6b501d4323bd063183b803a73bf97c29827aeae2
Author: William Casarin <jb55@jb55.com>
Date: Sun, 10 May 2020 01:03:45 -0700
init_gpu_program: just memset it
Signed-off-by: William Casarin <jb55@jb55.com>
Diffstat:
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/shader.c b/src/shader.c
@@ -146,8 +146,7 @@ int make_shader(GLenum type, const char *filename, struct shader *shader) {
#define N_SHADERS 3
void init_gpu_program(struct gpu_program *program) {
- program->n_shaders = 0;
- memset(program->shaders, 0, sizeof(program->shaders));
+ memset(program, 0, sizeof(*program));
}
#ifdef DEBUG