Visualize lights as colored wireframe objects.
More...
#include <DebugLightRenderer.hpp>
|
const Mesh * | _sphere |
| Point light supporting geometry.
|
|
const Mesh * | _cone |
| Spot light supporting geometry.
|
|
const Mesh * | _arrow |
| Spot light supporting geometry.
|
|
Program * | _program |
| Light mesh shader.
|
|
glm::mat4 | _view = glm::mat4(1.0f) |
| Cached camera view matrix.
|
|
glm::mat4 | _proj = glm::mat4(1.0f) |
| Cached camera projection matrix.
|
|
Visualize lights as colored wireframe objects.
Inherits LightRenderer.
◆ DebugLightRenderer()
DebugLightRenderer::DebugLightRenderer |
( |
const std::string & |
fragmentShader | ) |
|
|
explicit |
Constructor.
- See also
- GLSL::Frag::light_debug for an example.
- Parameters
-
fragmentShader | the name of the fragment shader to use. |
◆ draw() [1/3]
Draw a directional light as a colored wireframe arrow pointing at the origin.
- Parameters
-
Implements LightRenderer.
◆ draw() [2/3]
void DebugLightRenderer::draw |
( |
const PointLight * |
light | ) |
|
|
overridevirtual |
Draw a point light as a colored wireframe sphere.
- Parameters
-
Implements LightRenderer.
◆ draw() [3/3]
void DebugLightRenderer::draw |
( |
const SpotLight * |
light | ) |
|
|
overridevirtual |
Draw a spot light as a colored wireframe cone.
- Parameters
-
Implements LightRenderer.
◆ updateCameraInfos()
void DebugLightRenderer::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: