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

@@ -1,5 +1,6 @@
#version 330 core #version 330 core
layout(location = 0) in vec2 pos;
layout(location = 0) in vec4 pos;
void main() { void main() {
gl_Position = vec4(pos.x, pos.y, 0.0F, 1.0F); gl_Position = vec4(pos.x, pos.y, 0.0F, 1.0F);

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. // 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) // NOLINTBEGIN (bugprone-reserved-identifier)
extern char const NAM_S(default_vert_glsl)[]; extern char const NAM_S(sh_vert_glsl)[];
extern char const NAM_E(default_vert_glsl)[]; extern char const NAM_E(sh_vert_glsl)[];
extern char const NAM_S(default_frag_glsl)[]; extern char const NAM_S(sh_frag_glsl)[];
extern char const NAM_E(default_frag_glsl)[]; extern char const NAM_E(sh_frag_glsl)[];
// NOLINTEND // NOLINTEND
/* compile a shader */ /* 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)) #define COMPILE_NAME(_type, _name) shader_compile(_type, NAM_S(_name), NAM_E(_name) - NAM_S(_name))
int shader_init(GLuint pipe) { int shader_init(GLuint pipe) {
GLuint vs = COMPILE_NAME(GL_VERTEX_SHADER, default_vert_glsl); GLuint vs = COMPILE_NAME(GL_VERTEX_SHADER, sh_vert_glsl);
GLuint fs = COMPILE_NAME(GL_FRAGMENT_SHADER, default_frag_glsl); GLuint fs = COMPILE_NAME(GL_FRAGMENT_SHADER, sh_frag_glsl);
glAttachShader(pipe, vs); glAttachShader(pipe, vs);
glAttachShader(pipe, fs); glAttachShader(pipe, fs);