mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add 'modelviewer' ui element
This commit is contained in:
parent
761afe51a5
commit
7a25560bc0
7 changed files with 261 additions and 11 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue