From 6cd2eea48781dd7318b6ea78c5cdea4a3ee5db02 Mon Sep 17 00:00:00 2001 From: x2048 Date: Sun, 19 Mar 2023 21:31:15 +0100 Subject: Move drawing of wield tool into a dedicated step of the pipeline (#13338) --- src/client/render/plain.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/client/render/plain.cpp') diff --git a/src/client/render/plain.cpp b/src/client/render/plain.cpp index 11378b165..60abbb97a 100644 --- a/src/client/render/plain.cpp +++ b/src/client/render/plain.cpp @@ -39,6 +39,13 @@ void Draw3D::run(PipelineContext &context) return; context.hud->drawBlockBounds(); context.hud->drawSelectionMesh(); +} + +void DrawWield::run(PipelineContext &context) +{ + if (m_target) + m_target->activate(context); + if (context.draw_wield_tool) context.client->getCamera()->drawWieldedTool(); } @@ -144,6 +151,7 @@ void populatePlainPipeline(RenderPipeline *pipeline, Client *client) auto downscale_factor = getDownscaleFactor(); auto step3D = pipeline->own(create3DStage(client, downscale_factor)); pipeline->addStep(step3D); + pipeline->addStep(); pipeline->addStep(); step3D = addUpscaling(pipeline, step3D, downscale_factor); -- cgit v1.2.3