diff --git a/inferno/src/inferno/render/renderer.cpp b/inferno/src/inferno/render/renderer.cpp index ab001d8..5380c0a 100644 --- a/inferno/src/inferno/render/renderer.cpp +++ b/inferno/src/inferno/render/renderer.cpp @@ -47,6 +47,9 @@ namespace Inferno { uint32_t gpuTextureUnitCount = RenderCommand::textureUnitAmount(); m_supportedTextureUnitPerBatch = std::min(constTextureUnitCount, gpuTextureUnitCount); + // Texture unit 0 is reserved for no texture + m_textureUnits[0] = nullptr; + // Create texture unit samplers int32_t samplers[textureUnitPerBatch]; for (uint32_t i = 0; i < textureUnitPerBatch; i++) { @@ -136,9 +139,6 @@ namespace Inferno { m_vertexPositions[2] = { 0.5f, 0.5f, 0.0f, 1.0f }; m_vertexPositions[3] = { -0.5f, 0.5f, 0.0f, 1.0f }; - // Texture unit 0 is reserved for no texture - m_textureUnits[0] = nullptr; - // GPU // -----------------------------------------