Conquer Space 0.0.0
A space themed grand strategy game set in the near future, with realistic orbital mechanics, and an emphasis on economics and politics.
Public Member Functions | Public Attributes | Private Member Functions | List of all members
cqsp::asset::Shader Class Reference

#include <shader.h>

Inheritance diagram for cqsp::asset::Shader:
cqsp::asset::Asset

Public Member Functions

 Shader ()=default
 
 Shader (const std::string &code, ShaderType type)
 Constructs a shader from the code provided. More...
 
void operator() (const std::string &code, ShaderType type)
 Constructs a shader from the code provided. More...
 
 ~Shader ()
 
AssetType GetAssetType () override
 
- Public Member Functions inherited from cqsp::asset::Asset
virtual ~Asset ()=default
 

Public Attributes

ShaderType shader_type = ShaderType::NONE
 
unsigned int id
 Id of the shader. More...
 
- Public Attributes inherited from cqsp::asset::Asset
std::string path
 
int accessed = 0
 

Private Member Functions

 Shader (const Shader &)=default
 

Detailed Description

An opengl shader.

Do note that this is distinct from a shader program, and this has to be combined with either a vertex or fragmenet shader counterpart to be used in ShaderProgram

Constructor & Destructor Documentation

◆ Shader() [1/3]

cqsp::asset::Shader::Shader ( )
default

◆ Shader() [2/3]

cqsp::asset::Shader::Shader ( const std::string &  code,
ShaderType  type 
)

Constructs a shader from the code provided.

◆ ~Shader()

cqsp::asset::Shader::~Shader ( )

◆ Shader() [3/3]

cqsp::asset::Shader::Shader ( const Shader )
explicitprivatedefault

Member Function Documentation

◆ GetAssetType()

AssetType cqsp::asset::Shader::GetAssetType ( )
inlineoverridevirtual

Implements cqsp::asset::Asset.

◆ operator()()

void cqsp::asset::Shader::operator() ( const std::string &  code,
ShaderType  type 
)

Constructs a shader from the code provided.

Member Data Documentation

◆ id

unsigned int cqsp::asset::Shader::id

Id of the shader.

◆ shader_type

ShaderType cqsp::asset::Shader::shader_type = ShaderType::NONE

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