Migrate OpenGL string-literals to embedded files

Rather than declaring a big C++ literal for these strings, they are now
proper `.vert` and `.frag` files that will become embedded into the
application at build-time. It also allows for clang-format to format the
glsl files the same as our C++ code. CMake will also automatically track
and re-embed the file if it detects that the glsl source files have
changed since the last build. Ex, making a change to
`opengl_display.frag` and compiling will automatically recompile and
link the resource-target that it is associated with.
This commit is contained in:
Wunkolo 2023-07-15 19:04:53 -07:00
parent c294786846
commit a9bb11e4b3
6 changed files with 564 additions and 574 deletions

View file

@ -0,0 +1,6 @@
#version 410 core
in vec2 UV;
out vec4 FragColor;
uniform sampler2D u_texture;
void main() { FragColor = texture(u_texture, UV); }