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:
6
src/host_shaders/opengl_display.frag
Normal file
6
src/host_shaders/opengl_display.frag
Normal 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); }
|
||||
Reference in New Issue
Block a user