Added debug overlay support to GIFAnimComponent.

This commit is contained in:
Leon Styhre 2022-03-12 10:19:47 +01:00
parent 8497967510
commit bebc9d58cf

View file

@ -471,6 +471,11 @@ void GIFAnimComponent::render(const glm::mat4& parentTrans)
}
}
Renderer::setMatrix(trans);
if (Settings::getInstance()->getBool("DebugImage"))
Renderer::drawRect(0.0f, 0.0f, mSize.x, mSize.y, 0xFF000033, 0xFF000033);
if (mTexture->getSize().x != 0.0f) {
mTexture->bind();
@ -493,7 +498,6 @@ void GIFAnimComponent::render(const glm::mat4& parentTrans)
vertices->convertBGRAToRGBA = true;
// Render it.
Renderer::setMatrix(trans);
Renderer::drawTriangleStrips(&vertices[0], 4);
}
}