mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Move drawing of wield tool into a dedicated step of the pipeline (#13338)
This commit is contained in:
parent
09342c0811
commit
6cd2eea487
6 changed files with 36 additions and 9 deletions
|
@ -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<DrawWield>();
|
||||
pipeline->addStep<MapPostFxStep>();
|
||||
|
||||
step3D = addUpscaling(pipeline, step3D, downscale_factor);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue