MCPcopy Create free account
hub / github.com/davideberly/GeometricTools / AmbientLightEffect

Method AmbientLightEffect

GTE/Graphics/AmbientLightEffect.cpp:12–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10using namespace gte;
11
12AmbientLightEffect::AmbientLightEffect(std::shared_ptr<ProgramFactory> const& factory,
13 BufferUpdater const& updater, std::shared_ptr<Material> const& material,
14 std::shared_ptr<Lighting> const& lighting)
15 :
16 LightEffect(factory, updater, msVSSource, msPSSource, material, lighting, nullptr)
17{
18 mMaterialConstant = std::make_shared<ConstantBuffer>(sizeof(InternalMaterial), true);
19 UpdateMaterialConstant();
20 mProgram->GetVertexShader()->Set("Material", mMaterialConstant);
21
22 mLightingConstant = std::make_shared<ConstantBuffer>(sizeof(InternalLighting), true);
23 UpdateLightingConstant();
24 mProgram->GetVertexShader()->Set("Lighting", mLightingConstant);
25}
26
27void AmbientLightEffect::UpdateMaterialConstant()
28{

Callers

nothing calls this directly

Calls 1

SetMethod · 0.45

Tested by

no test coverage detected