Overte C++ Documentation
BackgroundStage.h
1 //
2 // BackgroundStage.h
3 //
4 // Created by Sam Gateau on 5/9/2017.
5 // Copyright 2015 High Fidelity, Inc.
6 // Copyright 2024 Overte e.V.
7 //
8 // Distributed under the Apache License, Version 2.0.
9 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
10 //
11 
12 #ifndef hifi_render_utils_BackgroundStage_h
13 #define hifi_render_utils_BackgroundStage_h
14 
15 #include <graphics/Stage.h>
16 #include <render/Stage.h>
17 #include <render/StageSetup.h>
18 
19 #include "HazeStage.h"
20 #include "LightingModel.h"
21 
22 // Background stage to set up background-related rendering tasks
23 class BackgroundStage : public render::PointerStage<graphics::SunSkyStage, graphics::SunSkyStagePointer> {};
24 using BackgroundStagePointer = std::shared_ptr<BackgroundStage>;
25 
26 class BackgroundStageSetup : public render::StageSetup<BackgroundStage> {
27 public:
28  using JobModel = render::Job::Model<BackgroundStageSetup>;
29 };
30 
31 class DrawBackgroundStage {
32 public:
33  using Inputs = render::VaryingSet3<LightingModelPointer, BackgroundStage::FramePointer, HazeStage::FramePointer>;
34  using JobModel = render::Job::ModelI<DrawBackgroundStage, Inputs>;
35 
36  DrawBackgroundStage(uint transformSlot) : _transformSlot(transformSlot) {}
37 
38  void run(const render::RenderContextPointer& renderContext, const Inputs& inputs);
39 
40 private:
41  uint _transformSlot;
42 };
43 
44 #endif