mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 21:17:01 +02:00
Merge pull request #7764 from zzmp/fix/text3d-pipeline
Fix strange rendering with Text3DOverlay
This commit is contained in:
commit
db6a07171f
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,
|
glm::vec4 textColor = { _color.red / MAX_COLOR, _color.green / MAX_COLOR,
|
||||||
_color.blue / MAX_COLOR, getTextAlpha() };
|
_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());
|
_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() {
|
const render::ShapeKey Text3DOverlay::getShapeKey() {
|
||||||
|
|
Loading…
Reference in a new issue