6#ifndef SHADER_COMPILER_HPP
7#define SHADER_COMPILER_HPP
80 std::move(shader_name))
Defines the OpenGL class that serves as the interface for OpenGL.
Defines the Shader class that serves as an abstraction over OpenGL shaders.
uint32_t ShaderProgramId
Definition OpenGL.hpp:38
Compiles GLSL shaders from a single source file. Vertex, Fragment and Geometry shaders are seperated ...
Definition ShaderCompiler.hpp:48
static Shader compile_from_file(std::string shader_name, const std::filesystem::path &shader_path)
Compiles a shader from file.
Definition ShaderCompiler.cpp:78
std::string * now_parsing(ShaderParsingResult &result, const std::string &line)
Returns the output field from the ShaderParsingResult for which to continue appending lines of the m_...
Definition ShaderCompiler.cpp:94
graphics::OpenGL::ShaderProgramId compile(const ShaderParsingResult &shader_sources)
Compile shader sources into a OpenGL shader program.
Definition ShaderCompiler.cpp:22
ShaderCompiler(std::string shader_name, std::string shader_source)
Definition ShaderCompiler.hpp:79
std::string m_shader_name
Definition ShaderCompiler.hpp:99
std::string m_sources
Definition ShaderCompiler.hpp:100
ShaderParsingResult parse_source()
Splits a single shader source string into vertex, fragment, [geometry] shader strings.
Definition ShaderCompiler.cpp:57
static Shader compile_from_source(std::string shader_name, std::string shader_source)
Compiles a shader from source.
Definition ShaderCompiler.cpp:13
Represents a linked shader program object within the OpenGL context.
Definition Shader.hpp:32
Definition GraphicsController.hpp:14
ShaderType
The type of the shader.
Definition Shader.hpp:19
Contains the parsed vertex, fragment, and geometry shaders, since the ShaderCompiler expects a single...
Definition ShaderCompiler.hpp:18
std::string geometry_shader
Definition ShaderCompiler.hpp:21
std::string fragment_shader
Definition ShaderCompiler.hpp:20
std::string vertex_shader
Definition ShaderCompiler.hpp:19