PCG-FPS
v2 m0.22.4
Simple First Person Shooter with Procedurally Generated Level
|
Go to the documentation of this file. 1 #ifndef SKR_FPS2_RENDERER_OPENGL_SHADER_H
2 #define SKR_FPS2_RENDERER_OPENGL_SHADER_H
44 Shader(std::string vertpath, std::string fragpath, std::string geompath = std::string(
""));
73 const void SetBool(std::string loc,
bool value);
78 const void SetFloat(std::string loc,
float value);
83 const void SetInt(std::string loc,
int value);
88 const void SetVec3(std::string loc, glm::vec3 value);
93 const void SetMat4(std::string loc, glm::mat4 value);
100 #endif // !SKR_FPS2_RENDERER_OPENGL_SHADER_H
uint32_t CompileShader(std::string code, GLenum type)
compile shader
Definition: Shader.cpp:79
std::string LoadShader(std::string path)
load shader from given path
Definition: Shader.cpp:54
const void Use()
set shader active
Definition: Shader.cpp:118
const void SetFloat(std::string loc, float value)
set float value
Definition: Shader.cpp:128
@ DebugLight
draw position of lights for debug purposes
@ DepthShadow
draw depthmap for shadow mapping
const void SetVec3(std::string loc, glm::vec3 value)
set vector 3 value
Definition: Shader.cpp:138
handles shader loading, compiling and linking. Also provides access to set uniform ids and usage.
Definition: Shader.h:31
const void SetInt(std::string loc, int value)
set integer value
Definition: Shader.cpp:133
@ MaterialMaps
use material maps (normal maps, specular maps) to draw
@ Simple
very simple shader: draw everything in a given solor
ShaderType
shader type identifies. Used as keys in map keeping shaders
Definition: Shader.h:18
Shader()
default constructor default constructor is needed since OpenGL Renderer Object is a global object,...
Definition: Shader.h:38
Definition: AssetPath.h:10
void CheckCompileErrors(GLuint shader)
check shader for compile errors
Definition: Shader.cpp:90
uint32_t _id
shader id
Definition: Shader.h:33
void CheckLinkErrors(GLuint shader)
check shader for linker errors
Definition: Shader.cpp:104
const void SetBool(std::string loc, bool value)
set boolean value
Definition: Shader.cpp:123
@ Skybox
shader to draw skybox
const void SetMat4(std::string loc, glm::mat4 value)
set matrix 4x4 value
Definition: Shader.cpp:143