Reset pipeline after rendering text3d

This commit is contained in:
Zach Pomerantz 2016-04-26 13:23:16 -07:00
parent 28b5ef63b8
commit 63b0c0a9ad

View file

@ -110,7 +110,14 @@ void Text3DOverlay::render(RenderArgs* args) {
glm::vec4 textColor = { _color.red / MAX_COLOR, _color.green / MAX_COLOR,
_color.blue / MAX_COLOR, getTextAlpha() };
// FIXME: Factor out textRenderer so that Text3DOverlay overlay parts can be grouped by pipeline
// for a gpu performance increase. Currently,
// Text renderer sets its own pipeline,
_textRenderer->draw(batch, 0, 0, _text, textColor, glm::vec2(-1.0f), getDrawInFront());
// so before we continue, we must reset the pipeline
batch.setPipeline(args->_pipeline->pipeline);
args->_pipeline->prepare(batch);
}
const render::ShapeKey Text3DOverlay::getShapeKey() {