CG-Project2
Loading...
Searching...
No Matches
ShaderComponent Class Reference

Component to store mesh shader data and some mesh information like light computation and the capability to reflect the skybox texture. More...

#include <Component.hpp>

Inheritance diagram for ShaderComponent:
Collaboration diagram for ShaderComponent:

Public Member Functions

 ShaderComponent ()=delete
 Can't use an empty constructor.
 ShaderComponent (const LightComputation &comp, const std::string &vert, const std::string &frag, const bool &reflective=false, const std::string &geom="")
 Instances the Component by giving shaders path and light computation. The light computation might be used in systems while sending data to shaders.

Public Attributes

LightComputation computation = LightComputation::PHONG
 mesh light computation
bool reflective = false
 mesh reflectiveness
std::string vert {}
 vertex shader path
std::string frag {}
 fragment shader path
std::string geom {}
 geometry shader path

Detailed Description

Component to store mesh shader data and some mesh information like light computation and the capability to reflect the skybox texture.

Constructor & Destructor Documentation

◆ ShaderComponent()

ShaderComponent::ShaderComponent ( const LightComputation & comp,
const std::string & vert,
const std::string & frag,
const bool & reflective = false,
const std::string & geom = "" )
inline

Instances the Component by giving shaders path and light computation. The light computation might be used in systems while sending data to shaders.

Parameters
compmesh light computation
vertvertex shader path
fragfragment shader path
geomgeometry shader path (default none)
reflectivetrue if the mesh reflects the skybox (if present)
Note
LightComputation tell to the ogl::ShaderProgram which alghoritm will be used while shading that mesh.

Member Data Documentation

◆ computation

LightComputation ShaderComponent::computation = LightComputation::PHONG

mesh light computation

See also
ShaderComponent(const LightComputation &comp, const std::string &vert, const std::string &frag, const bool &reflective = false, const std::string &geom = "")

The documentation for this class was generated from the following file: