Golias Engine
A C++ 20 'game engine' built with SDL3 with wide platform support.
shader_preprocessor.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
4 
5 
6 // TODO: we must create a robust shader preprocessor with naming conventions and more features
7 struct ShaderSource {
8  std::string vertex_source;
9  std::string fragment_source;
10  std::string compute_source;
11  bool is_compute = false;
12  bool is_loaded = false;
13 };
14 
15 ShaderSource parse_shader(const std::string& source);
16 
17 ShaderSource load_shader_file(const char* filepath);
18 
19 std::string get_shader_header();
ShaderSource parse_shader(const std::string &source)
Definition: shader_preprocessor.cpp:157
ShaderSource load_shader_file(const char *filepath)
Definition: shader_preprocessor.cpp:342
std::string get_shader_header()
Definition: shader_preprocessor.cpp:3
Definition: shader_preprocessor.h:7
std::string vertex_source
Definition: shader_preprocessor.h:8
bool is_compute
Definition: shader_preprocessor.h:11
bool is_loaded
Definition: shader_preprocessor.h:12
std::string compute_source
Definition: shader_preprocessor.h:10
std::string fragment_source
Definition: shader_preprocessor.h:9