17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-01 18:24:21 +01:00

Draw the instances from the GPU with multi draws, the model block of each draw read by its number

This commit is contained in:
2026-10-18 00:47:05 +02:00
parent 7221c153dd
commit 494304903f
18 changed files with 609 additions and 64 deletions

View File

@@ -21,7 +21,8 @@ namespace gl
#ifdef SHADERVALIDATOR_STANDALONE
shader() = default;
#endif
explicit shader(const std::string &filename);
// Defines: lines put before the source (after the version), e.g. "#define MODEL_DRAWS 1\n" for a variant of the shader
explicit shader(const std::string &filename, const std::string &defines = {});
~shader();
enum class components_e
@@ -67,7 +68,7 @@ namespace gl
#ifndef SHADERVALIDATOR_STANDALONE
private:
#endif
std::pair<GLuint, std::string> process_source(const std::string &filename, const std::string &basedir);
std::pair<GLuint, std::string> process_source(const std::string &filename, const std::string &basedir, const std::string &defines = {});
void expand_includes(std::string &str, const std::string &basedir);
void parse_texture_entries(std::string &str);