MCPcopy Create free account
hub / github.com/carbonengine/trinity / AddLibrary

Method AddLibrary

trinity/Raytracing/Tr2RaytracingGeometry.cpp:38–62  ·  view source on GitHub ↗

remove material

Source from the content-addressed store, hash-verified

36
37// remove material
38bool Tr2RaytracingPipelineStateManager::AddLibrary( BlueSharedStringW& rayGenName, BlueSharedStringW& missName, Tr2Material* material, const BlueSharedString& techniqueName )
39{
40 if( !material )
41 {
42 return false;
43 }
44 auto shader = material->GetShaderStateInterface();
45 if( !shader )
46 {
47 return false;
48 }
49 uint32_t techniqueIndex;
50 if( !shader->GetTechniqueIndex( techniqueName, techniqueIndex ) )
51 {
52 return false;
53 }
54 auto& desc = shader->GetEffectDescription();
55 if( desc.techniques[techniqueIndex].libraries.empty() )
56 {
57 return false;
58 }
59
60 AddLibrary( rayGenName, missName, desc.techniques[techniqueIndex].libraries[0] );
61 return true;
62}
63
64void Tr2RaytracingPipelineStateManager::AddLibrary( BlueSharedStringW& rayGenName, BlueSharedStringW& missName, const Tr2EffectLibrary& library )
65{

Callers 3

RenderFogMethod · 0.80
RenderShadowsMethod · 0.80

Calls 6

GetTechniqueIndexMethod · 0.80
emptyMethod · 0.80
AddShadersMethod · 0.80
AddGlobalSignatureMethod · 0.80
endMethod · 0.45

Tested by

no test coverage detected