Bomberman
Public Member Functions | Public Attributes | List of all members
BBM::ShaderComponent Class Reference

#include <ShaderComponent.hpp>

Inheritance diagram for BBM::ShaderComponent:
Collaboration diagram for BBM::ShaderComponent:

Public Member Functions

RAY::ShadergetShader ()
 getter for _shader More...
 
WAL::Componentclone (WAL::Entity &entity) const override
 Clone a component for another or the same entity. More...
 
std::string getFragmentFilePath () const
 get the fragment file path More...
 
std::string getVertexFilePath () const
 get the fragment file path More...
 
 ShaderComponent (WAL::Entity &entity, const std::string &fragmentFilePath, const std::string &vertexFilePath="", const WAL::Callback< WAL::Entity &, WAL::Wal &, std::chrono::nanoseconds > &onFixedUpdate=WAL::Callback< WAL::Entity &, WAL::Wal &, std::chrono::nanoseconds >(), bool lonely=false)
 ctor More...
 
 ShaderComponent (const ShaderComponent &)=default
 Default copy ctor. More...
 
 ~ShaderComponent () override=default
 Default dtor. More...
 
ShaderComponentoperator= (const ShaderComponent &)=delete
 Default assignment operator. More...
 
- Public Member Functions inherited from WAL::Component
Componentoperator= (const Component &)=delete
 A component can't be assigned. More...
 
virtual ~Component ()=default
 A virtual destructor. More...
 
virtual void onStart ()
 The entity or this component has just been enabled. More...
 
virtual void onStop ()
 The entity or this component has just been disable. More...
 

Public Attributes

RAY::Shader shader
 The shader to be applied. More...
 
std::string fragmentFilePath
 The path to the fragment file. More...
 
std::string vertexFilePath
 The path to the vertex file. More...
 
WAL::Callback< WAL::Entity &, WAL::Wal &, std::chrono::nanoseconds > update
 the function called to update shaders vars More...
 

Additional Inherited Members

- Protected Member Functions inherited from WAL::Component
 Component (Entity &entity)
 A component can't be instantiated, it should be derived. More...
 
 Component (const Component &)=default
 A component can't be instantiated, it should be derived. More...
 
- Protected Attributes inherited from WAL::Component
Entity_entity
 The entity that own this component. More...
 

Constructor & Destructor Documentation

◆ ShaderComponent() [1/2]

BBM::ShaderComponent::ShaderComponent ( WAL::Entity entity,
const std::string &  fragmentFilePath,
const std::string &  vertexFilePath = "",
const WAL::Callback< WAL::Entity &, WAL::Wal &, std::chrono::nanoseconds > &  onFixedUpdate = WAL::Callback<WAL::Entity &, WAL::Wal &, std::chrono::nanoseconds>(),
bool  lonely = false 
)

ctor

Note
use empty string to omit a file

◆ ShaderComponent() [2/2]

BBM::ShaderComponent::ShaderComponent ( const ShaderComponent )
default

Default copy ctor.

◆ ~ShaderComponent()

BBM::ShaderComponent::~ShaderComponent ( )
overridedefault

Default dtor.

Member Function Documentation

◆ clone()

WAL::Component * BBM::ShaderComponent::clone ( WAL::Entity entity) const
overridevirtual

Clone a component for another or the same entity.

Parameters
entityThe entity that owns the ne component.

Implements WAL::Component.

◆ getFragmentFilePath()

std::string BBM::ShaderComponent::getFragmentFilePath ( ) const

get the fragment file path

◆ getShader()

RAY::Shader & BBM::ShaderComponent::getShader ( )

getter for _shader

◆ getVertexFilePath()

std::string BBM::ShaderComponent::getVertexFilePath ( ) const

get the fragment file path

◆ operator=()

ShaderComponent& BBM::ShaderComponent::operator= ( const ShaderComponent )
delete

Default assignment operator.

Member Data Documentation

◆ fragmentFilePath

std::string BBM::ShaderComponent::fragmentFilePath

The path to the fragment file.

◆ shader

RAY::Shader BBM::ShaderComponent::shader

The shader to be applied.

◆ update

WAL::Callback<WAL::Entity &, WAL::Wal &, std::chrono::nanoseconds> BBM::ShaderComponent::update

the function called to update shaders vars

◆ vertexFilePath

std::string BBM::ShaderComponent::vertexFilePath

The path to the vertex file.


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