From 760d9b6b9c28d12f5f42d1fbfc4959e34aba143c Mon Sep 17 00:00:00 2001 From: Abdelrahman Date: Sun, 18 Aug 2024 22:18:12 +0100 Subject: [PATCH] Move shaders declaration to shaders.h --- src/main.c | 6 ------ src/shader/shaders.h | 7 +++++++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/main.c b/src/main.c index 6b42c2e..1b55a89 100644 --- a/src/main.c +++ b/src/main.c @@ -3,7 +3,6 @@ #include "mem_utils.h" #include "obj.h" #include "render.h" -#include "shader.h" #include "shaders.h" #include #include @@ -13,11 +12,6 @@ #define SIZE 1200 #define RESOURCE(NAME) "resources/" NAME -extern ShaderID perspective_phong; -extern ShaderID perspective_albedo; -extern ShaderID orthographic_phong; -extern ShaderID orthographic_albedo; - enum { TINY_EXIT_SUCCESS, TINY_EXIT_ARENA_INIT_FAILED, diff --git a/src/shader/shaders.h b/src/shader/shaders.h index 2022243..2f9c108 100644 --- a/src/shader/shaders.h +++ b/src/shader/shaders.h @@ -1,6 +1,13 @@ #ifndef SHADERS_H #define SHADERS_H +#include "shader.h" + +extern ShaderID perspective_phong; +extern ShaderID perspective_albedo; +extern ShaderID orthographic_phong; +extern ShaderID orthographic_albedo; + void load_shaders(void); #endif // SHADERS_H