refactor rendering

This commit is contained in:
2025-07-16 13:38:02 +02:00
parent 1bee6aed9c
commit 9667454811
14 changed files with 130 additions and 105 deletions

View File

@@ -1,10 +1,15 @@
#pragma once
#include <string>
#include <td/Maths.h>
#include <td/render/OpenGL.h>
#include <string>
namespace td {
namespace render {
class Renderer;
} // namespace render
namespace shader {
class ShaderProgram {
@@ -15,10 +20,10 @@ class ShaderProgram {
void Start() const;
void Stop() const;
protected:
void LoadProgramFile(const std::string& vertexFile, const std::string& fragmentFile);
void LoadProgram(const std::string& vertexSource, const std::string& fragmentSource);
protected:
virtual void GetAllUniformLocation() = 0;
int GetUniformLocation(const std::string& uniformName) const;