Skip to content

Vp::Lighting

Class that manages passing of light information to shaders.

#include "Viewport/scene/Lighting.h"

Public Functions

Name
voidaddLight(const std::shared_ptr< Light > & light)
voidaddLight(Light * light)
std::vector< std::shared_ptr< Light > >getLights() const
voidremoveLight(std::shared_ptr< Light > & light)
voidsetUniforms(const PhongShader & shader) const<br>Set light information uniforms for a shader.

Public Functions Documentation

function addLight

cpp
void addLight(
    const std::shared_ptr< Light > & light
)
void addLight(
    const std::shared_ptr< Light > & light
)

function addLight

cpp
void addLight(
    Light * light
)
void addLight(
    Light * light
)

function getLights

cpp
std::vector< std::shared_ptr< Light > > getLights() const
std::vector< std::shared_ptr< Light > > getLights() const

function removeLight

cpp
void removeLight(
    std::shared_ptr< Light > & light
)
void removeLight(
    std::shared_ptr< Light > & light
)

function setUniforms

cpp
void setUniforms(
    const PhongShader & shader
) const
void setUniforms(
    const PhongShader & shader
) const

Set light information uniforms for a shader.

Parameters:

  • shader The shader

Updated on 2024-11-06 at 20:16:53 +0000