MCPcopy Create free account
hub / github.com/deathkiller/jazz2-native / LoadFromCache

Method LoadFromCache

Sources/nCine/Graphics/Shader.cpp:385–396  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

383 }
384
385 bool Shader::LoadFromCache(const char* shaderName, std::uint64_t shaderVersion, Introspection introspection)
386 {
387 ZoneScopedC(0x81A861);
388 if (shaderName != nullptr) {
389 // When Tracy is disabled the statement body is empty and braces are needed
390 ZoneText(shaderName, std::strlen(shaderName));
391 }
392
393 glShaderProgram_->Reset();
394 glShaderProgram_->SetObjectLabel(shaderName);
395 return RenderResources::GetBinaryShaderCache().LoadFromCache(shaderName, shaderVersion, glShaderProgram_.get(), shaderToShaderProgramIntrospection(introspection));
396 }
397
398 bool Shader::SaveToCache(const char* shaderName, std::uint64_t shaderVersion) const
399 {

Callers 2

CreateMethod · 0.45
CompileShaderMethod · 0.45

Calls 4

ResetMethod · 0.45
SetObjectLabelMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected