mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-21 21:05:50 +12:00
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:
parent
c294786846
commit
a9bb11e4b3
6 changed files with 564 additions and 574 deletions
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); }
|
Loading…
Add table
Add a link
Reference in a new issue