Overte C++ Documentation
RenderHUDLayerTask.h
1 //
2 // Created by Sam Gateau on 2019/06/14
3 // Copyright 2013-2019 High Fidelity, Inc.
4 // Copyright 2024 Overte e.V.
5 //
6 // Distributed under the Apache License, Version 2.0.
7 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
8 //
9 
10 #ifndef hifi_RenderHUDLayerTask_h
11 #define hifi_RenderHUDLayerTask_h
12 
13 #include "LightingModel.h"
14 #include "HazeStage.h"
15 #include "DeferredFrameTransform.h"
16 
17 class CompositeHUD {
18 public:
19  // IF specified the input Framebuffer is actively set by the batch of this job before calling the HUDOperator.
20  // If not, the current Framebuffer is left unchanged.
21  //using Inputs = gpu::FramebufferPointer;
22  using JobModel = render::Job::ModelI<CompositeHUD, gpu::FramebufferPointer>;
23 
24  CompositeHUD(uint transformSlot) : _transformSlot(transformSlot) {}
25 
26  void run(const render::RenderContextPointer& renderContext, const gpu::FramebufferPointer& inputs);
27 
28 private:
29  uint _transformSlot;
30 };
31 
32 class RenderHUDLayerTask {
33 public:
34  // Framebuffer where to draw, lighting model, opaque items, transparent items
35  using Input = render::VaryingSet6<gpu::FramebufferPointer, LightingModelPointer, render::ItemBounds, render::ItemBounds, HazeStage::FramePointer, DeferredFrameTransformPointer>;
36  using JobModel = render::Task::ModelI<RenderHUDLayerTask, Input>;
37 
38  void build(JobModel& task, const render::Varying& input, render::Varying& output, render::ShapePlumberPointer shapePlumber, uint transformSlot);
39 };
40 
41 #endif // hifi_RenderHUDLayerTask_h