@@ -64,6 +64,29 @@ If needed, a section can be split into subsections with a "------" delimiter.
64
64
65
65
## Learning Material Updates
66
66
67
+ ### [ An OpenGL preprocessor for Rust]
68
+
69
+ With the power of cargo build scripts full power of [ Tera] , you can create advanced
70
+ GLSL preprocessor which can generate code conditionally, in loops, and even
71
+ inherit code from other templates.
72
+
73
+ ![ An OpenGL preprocessor for Rust] ( opengl_preprocessor.png )
74
+
75
+ Writing plain GLSL code is uncomfortable, code is quite often is duplicated, libraries
76
+ aren't something natural for GLSL (means you can't out of the box do #include "library.glsl").
77
+ Last point especially problematic if some constants actually originate in your
78
+ game logic (like the number of player types). Updating these values manually in
79
+ your shader code is repetitive and prone to both error and simple forgetfulness.
80
+ It’s really helpful to build some kind of preprocessor for your GLSL code,
81
+ which can include other files, so you can organize your code into manageable chunks.
82
+ With the power of [ Tera] , it's now easy to accomplish.
83
+ Because Rust is also often used for web projects, which need a lot of templated
84
+ web-pages preprocessing, we can borrow such technology for our needs,
85
+ combine it with cargo build scripts and create compile-time preprocessing tool.
86
+
87
+ [ tera ] : https://tera.netlify.app
88
+ [ An OpenGL preprocessor for Rust ] : https://codecrash.me/an-opengl-preprocessor-for-rust
89
+
67
90
## Library & Tooling Updates
68
91
69
92
## Popular Workgroup Issues in Github
0 commit comments