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 | List of all members
cqsp::asset::ShaderDefinition Class Reference

#include <shader.h>

Inheritance diagram for cqsp::asset::ShaderDefinition:
cqsp::asset::Asset

Public Member Functions

ShaderProgram_t MakeShader ()
 
AssetType GetAssetType () override
 
- Public Member Functions inherited from cqsp::asset::Asset
virtual ~Asset ()=default
 

Public Attributes

std::string vert
 Code for vertex shader. More...
 
std::string frag
 Code for fragment shader. More...
 
std::string geometry
 Code for geometry file. More...
 
Hjson::Value uniforms
 
- Public Attributes inherited from cqsp::asset::Asset
std::string path
 
int accessed = 0
 

Detailed Description

A shader definiton file.
A shader defintion is a way to simplify the creation of shader objects.
A shader definiton file is loaded in hjson, and follows this format:

{
vert: (vertex shader name)
frag: (fragment shader name)
test_vec3: [1, 3, 5]
test_float: 19.5
test_int: 15
test_texture_name: (texture id)
}
}
std::string vert
Code for vertex shader.
Definition: shader.h:148
Hjson::Value uniforms
Definition: shader.h:157
std::string frag
Code for fragment shader.
Definition: shader.h:151

For uniforms, the shader will read the types of uniforms in the shader, and use them.

Matrices are not supported yet

Member Function Documentation

◆ GetAssetType()

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

Implements cqsp::asset::Asset.

◆ MakeShader()

cqsp::asset::ShaderProgram_t cqsp::asset::ShaderDefinition::MakeShader ( )

Member Data Documentation

◆ frag

std::string cqsp::asset::ShaderDefinition::frag

Code for fragment shader.

◆ geometry

std::string cqsp::asset::ShaderDefinition::geometry

Code for geometry file.

◆ uniforms

Hjson::Value cqsp::asset::ShaderDefinition::uniforms

◆ vert

std::string cqsp::asset::ShaderDefinition::vert

Code for vertex shader.


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