mirror of
https://github.com/overte-org/overte.git
synced 2025-04-16 13:56:24 +02:00
Reset pipeline after rendering text3d
This commit is contained in:
parent
28b5ef63b8
commit
63b0c0a9ad
1 changed files with 7 additions and 0 deletions
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue