mirror of
https://github.com/thepigeongenerator/mcaselector-lite.git
synced 2025-12-17 06:15:47 +01:00
rename shader files
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#version 330 core
|
||||
layout(location = 0) in vec2 pos;
|
||||
|
||||
layout(location = 0) in vec4 pos;
|
||||
|
||||
void main() {
|
||||
gl_Position = vec4(pos.x, pos.y, 0.0F, 1.0F);
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user