Use the shader manager singleton in the renderer
This commit is contained in:
@@ -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();
|
||||||
|
|||||||
@@ -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;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user