| 144 | } |
| 145 | |
| 146 | void gl_shader_asset::recompile_all() |
| 147 | { |
| 148 | // Compile at least the default variant with no includes defined... |
| 149 | if (shaders.empty()) |
| 150 | { |
| 151 | auto newVariant = std::make_shared<shader_variant>(); |
| 152 | newVariant->shader = std::move(compile_variant({})); |
| 153 | shaders[0] = newVariant; |
| 154 | } |
| 155 | |
| 156 | for (auto & variant : shaders) |
| 157 | { |
| 158 | variant.second->shader = compile_variant(variant.second->defines); |
| 159 | } |
| 160 | } |
| 161 | |
| 162 | gl_shader gl_shader_asset::compile_variant(const std::vector<std::string> defines) |
| 163 | { |