restructure v2

This commit is contained in:
Claire Schwarzer 2026-07-08 14:24:34 +02:00
parent e01595e155
commit dc5654ba9a
20 changed files with 910 additions and 791 deletions

34
engine/Backend/Shader.h Normal file
View file

@ -0,0 +1,34 @@
#pragma once
#include <glad/glad.h>
#include <glm/glm.hpp>
#include <string>
class Shader
{
public:
unsigned int ID;
Shader(const char* vertexPath, const char* fragmentPath);
void Use() const;
// Setters;
void setBool(const std::string &name, bool value) const;
void setInt(const std::string &name, int value) const;
void setFloat(const std::string &name, float value) const;
void setVec2(const std::string &name, const glm::vec2 &value) const;
void setVec2(const std::string &name, float x, float y) const;
void setVec3(const std::string &name, const glm::vec3 &value) const;
void setVec3(const std::string &name, float x, float y, float z) const;
void setArr(const std::string &name, const GLint value[], const int &count) const;
void setVec4(const std::string &name, const glm::vec4 &value) const;
void setVec4(const std::string &name, float x, float y, float z, float w) const;
void setMat2(const std::string &name, const glm::mat2 &mat) const;
void setMat3(const std::string &name, const glm::mat3 &mat) const;
void setMat4(const std::string &name, const glm::mat4 &mat) const;
void setDecal(int index, GLint tex, float opacity, const glm::vec4& uvCoords) const;
private:
void checkCompileErrors(unsigned int shader, std::string type);
};