rename shader files

This commit is contained in:
2025-06-05 17:00:56 +02:00
parent a184cf93fc
commit c5d3449abc
3 changed files with 8 additions and 7 deletions

View File

@@ -10,10 +10,10 @@
// NOTE: we are currently just sucking up the memory costs for ease. We can either include the source files themselves. Or use compression, where I'd prefer the latter for ease of installation.
// NOLINTBEGIN (bugprone-reserved-identifier)
extern char const NAM_S(default_vert_glsl)[];
extern char const NAM_E(default_vert_glsl)[];
extern char const NAM_S(default_frag_glsl)[];
extern char const NAM_E(default_frag_glsl)[];
extern char const NAM_S(sh_vert_glsl)[];
extern char const NAM_E(sh_vert_glsl)[];
extern char const NAM_S(sh_frag_glsl)[];
extern char const NAM_E(sh_frag_glsl)[];
// NOLINTEND
/* compile a shader */
@@ -27,8 +27,8 @@ static GLuint shader_compile(GLenum type, char const* src, size_t len) {
#define COMPILE_NAME(_type, _name) shader_compile(_type, NAM_S(_name), NAM_E(_name) - NAM_S(_name))
int shader_init(GLuint pipe) {
GLuint vs = COMPILE_NAME(GL_VERTEX_SHADER, default_vert_glsl);
GLuint fs = COMPILE_NAME(GL_FRAGMENT_SHADER, default_frag_glsl);
GLuint vs = COMPILE_NAME(GL_VERTEX_SHADER, sh_vert_glsl);
GLuint fs = COMPILE_NAME(GL_FRAGMENT_SHADER, sh_frag_glsl);
glAttachShader(pipe, vs);
glAttachShader(pipe, fs);