add 'modelviewer' ui element

This commit is contained in:
MihailRis
2025-05-24 19:28:24 +03:00
parent 761afe51a5
commit 7a25560bc0
7 changed files with 261 additions and 11 deletions
+6
View File
@@ -16,6 +16,7 @@
namespace fs = std::filesystem;
GLSLExtension* Shader::preprocessor = new GLSLExtension();
Shader* Shader::used = nullptr;
Shader::Shader(uint id) : id(id){
}
@@ -25,6 +26,7 @@ Shader::~Shader(){
}
void Shader::use(){
used = this;
glUseProgram(id);
}
@@ -131,3 +133,7 @@ std::unique_ptr<Shader> Shader::create(
}
return std::make_unique<Shader>(id);
}
Shader& Shader::getUsed() {
return *used;
}