| 10 | using namespace gte; |
| 11 | |
| 12 | AmbientLightEffect::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 | |
| 27 | void AmbientLightEffect::UpdateMaterialConstant() |
| 28 | { |