Use the shader manager singleton in the renderer

This commit is contained in:
Riyyi
2021-01-11 01:37:46 +01:00
parent 57a34b8be1
commit fafc831d4e
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -75,7 +75,7 @@ namespace Inferno {
// ----------------------------------------- // -----------------------------------------
// Create shader // Create shader
s_quadBatch->shader = std::make_unique<Shader>("assets/glsl/batch-quad"); s_quadBatch->shader = ShaderManager::the().load("assets/glsl/batch-quad");
s_quadBatch->shader->bind(); s_quadBatch->shader->bind();
s_quadBatch->shader->setInt("u_textures", samplers, s_quadBatch->textureUnitPerBatch); s_quadBatch->shader->setInt("u_textures", samplers, s_quadBatch->textureUnitPerBatch);
s_quadBatch->shader->unbind(); s_quadBatch->shader->unbind();
+1 -1
View File
@@ -47,7 +47,7 @@ namespace Inferno {
std::array<std::shared_ptr<Texture>, textureUnitPerBatch> textureUnits; std::array<std::shared_ptr<Texture>, textureUnitPerBatch> textureUnits;
// GPU objects // GPU objects
std::unique_ptr<Shader> shader = nullptr; std::shared_ptr<Shader> shader = nullptr;
std::shared_ptr<VertexArray> vertexArray = nullptr; std::shared_ptr<VertexArray> vertexArray = nullptr;
}; };