MCPcopy Create free account
hub / github.com/ddiakopoulos/polymer / recompile_all

Method recompile_all

libraries/lib-engine/src/shader.cpp:146–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144}
145
146void 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
162gl_shader gl_shader_asset::compile_variant(const std::vector<std::string> defines)
163{

Callers 1

handle_recompileMethod · 0.80

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected