Elevate Engine 1
Loading...
Searching...
No Matches
SceneLighting.h
Go to the documentation of this file.
1#pragma once
2
3#include <memory>
4#include <vector>
5
6// The maximum number of each lights to have in the game, these numbers are passed to the shader at compile time
7#define MAX_DIRECTIONAL_LIGHT 1
8#define MAX_POINTLIGHT 32
9#define MAX_SPOTLIGHT 32
10
11namespace Elevate
12{
13 class DirectionalLight;
14 class PointLight;
15 class Shader;
16
18 {
19 public:
20 SceneLighting() = default;
21 SceneLighting(DirectionalLight* dirLight, std::initializer_list<PointLight*> pointLights)
22 : m_dirLight(dirLight), m_pointLights(pointLights) { }
23 SceneLighting(DirectionalLight* dirLight, const std::vector<PointLight*>& pointLights)
24 : m_dirLight(dirLight), m_pointLights(pointLights) {}
25
26 void UploadToShader(const std::shared_ptr<Shader>& shader) const;
27 private:
28 DirectionalLight* m_dirLight;
29 std::vector<PointLight*> m_pointLights;
30 };
31}
void UploadToShader(const std::shared_ptr< Shader > &shader) const
SceneLighting(DirectionalLight *dirLight, const std::vector< PointLight * > &pointLights)
SceneLighting(DirectionalLight *dirLight, std::initializer_list< PointLight * > pointLights)