Store lights data for forward rendering in a GPU buffer.
More...
#include <ForwardLight.hpp>
|
size_t | _currentId = 0 |
| Current insertion location.
|
|
size_t | _currentCount = 0 |
| Number of lights to store.
|
|
UniformBuffer< GPULight > | _lightsData |
| GPU buffer.
|
|
glm::mat4 | _view = glm::mat4(1.0f) |
| Cached camera view matrix.
|
|
glm::mat4 | _proj = glm::mat4(1.0f) |
| Cached camera projection matrix.
|
|
glm::mat4 | _invView = glm::mat4(1.0f) |
| Cached inverse view matrix.
|
|
std::vector< const Texture * > | _shadowMaps |
| Shadow maps list.
|
|
|
static const size_t | _maxLightCount = 50 |
| Maximum allowed number of lights (see forward_lights.glsl).
|
|
Store lights data for forward rendering in a GPU buffer.
Inherits LightRenderer.
◆ ForwardLight()
ForwardLight::ForwardLight |
( |
size_t |
count | ) |
|
|
explicit |
Constructor.
- Parameters
-
count | number of lights that will be submitted |
◆ count()
size_t ForwardLight::count |
( |
| ) |
const |
|
inline |
- Returns
- the current number of lights
◆ data()
- Returns
- the GPU lights recorded buffer
◆ draw() [1/3]
Record directional light information for rendering.
- Parameters
-
light | the light to compute the contribution of |
Implements LightRenderer.
◆ draw() [2/3]
void ForwardLight::draw |
( |
const PointLight * |
light | ) |
|
|
overridevirtual |
Record point light information for rendering.
- Parameters
-
light | the light to compute the contribution of |
Implements LightRenderer.
◆ draw() [3/3]
void ForwardLight::draw |
( |
const SpotLight * |
light | ) |
|
|
overridevirtual |
Record spot light information for rendering.
- Parameters
-
light | the light to compute the contribution of |
Implements LightRenderer.
◆ shadowMaps()
const std::vector< const Texture * > & ForwardLight::shadowMaps |
( |
| ) |
const |
|
inline |
- Returns
- the shadow maps used by the lights
◆ updateCameraInfos()
void ForwardLight::updateCameraInfos |
( |
const glm::mat4 & |
viewMatrix, |
|
|
const glm::mat4 & |
projMatrix |
|
) |
| |
Set the current user view and projection matrices.
- Parameters
-
viewMatrix | the camera view matrix |
projMatrix | the camera projection matrix |
The documentation for this class was generated from the following files: