Brunot
Loading...
Searching...
No Matches
Shader Class Reference

#include <Shader.h>

Public Member Functions

 Shader ()
 Shader (const std::string &vertexFile, const std::string &fragmentFile)
 ~Shader ()
 Shader (const Shader &other)
 Shader (Shader &&other) noexcept
auto operator= (const Shader &other) -> Shader &
auto operator= (Shader &&other) noexcept -> Shader &
auto activate () const -> void
auto deactivate () const -> void
auto setCamera () const -> void
 Sets the view and projection transforms for the shader The shader to be set must be currently loaded.
auto ID () const -> GLuint
auto loadFile (const std::string &vertexFile, const std::string &fragmentFile) -> void
auto load (Stream &stream) -> void
auto save (Stream &stream) const -> void
auto name () const -> const std::string &
auto name (const std::string &name) -> void

Private Attributes

std::string _name
std::string vertexPath
std::string fragmentPath
GLuint shaderID

Friends

auto to_json (json &j, const Shader &a) ->void
auto from_json (const json &j, Shader &a) ->void

Constructor & Destructor Documentation

◆ Shader() [1/4]

Shader::Shader ( )
Here is the caller graph for this function:

◆ Shader() [2/4]

Shader::Shader ( const std::string & vertexFile,
const std::string & fragmentFile )
Here is the call graph for this function:

◆ ~Shader()

Shader::~Shader ( )
Here is the call graph for this function:

◆ Shader() [3/4]

Shader::Shader ( const Shader & other)
Here is the call graph for this function:

◆ Shader() [4/4]

Shader::Shader ( Shader && other)
noexcept
Here is the call graph for this function:

Member Function Documentation

◆ activate()

auto Shader::activate ( ) const->void
Here is the call graph for this function:

◆ deactivate()

auto Shader::deactivate ( ) const->void
Here is the call graph for this function:

◆ ID()

auto Shader::ID ( ) const->GLuint
inline

◆ load()

auto Shader::load ( Stream & stream) ->void

◆ loadFile()

auto Shader::loadFile ( const std::string & vertexFile,
const std::string & fragmentFile )->void
Here is the call graph for this function:
Here is the caller graph for this function:

◆ name() [1/2]

auto Shader::name ( ) const->conststd::string &
inlinenodiscard
Returns
the name of the Shader's .json file
Here is the caller graph for this function:

◆ name() [2/2]

auto Shader::name ( const std::string & name) ->void
inline
Parameters
namethe name of the shader's .json file
Here is the call graph for this function:

◆ operator=() [1/2]

auto Shader::operator= ( const Shader & other) ->Shader &
Here is the call graph for this function:

◆ operator=() [2/2]

auto Shader::operator= ( Shader && other) ->Shader &
noexcept
Here is the call graph for this function:

◆ save()

auto Shader::save ( Stream & stream) const->void

◆ setCamera()

auto Shader::setCamera ( ) const->void

Sets the view and projection transforms for the shader The shader to be set must be currently loaded.

Here is the call graph for this function:

◆ from_json

auto from_json ( const json & j,
Shader & a )->void
friend

◆ to_json

auto to_json ( json & j,
const Shader & a )->void
friend

Member Data Documentation

◆ _name

std::string Shader::_name
private

◆ fragmentPath

std::string Shader::fragmentPath
private

◆ shaderID

GLuint Shader::shaderID
private

◆ vertexPath

std::string Shader::vertexPath
private

The documentation for this class was generated from the following files:
  • /home/egrazil/sites/Brunot/The House/source/Graphics/Shader.h
  • /home/egrazil/sites/Brunot/The House/source/Graphics/Shader.cpp