Overte C++ Documentation
ProceduralSkybox.h
1 //
2 // ProceduralSkybox.h
3 // libraries/procedural/src/procedural
4 //
5 // Created by Sam Gateau on 9/21/15.
6 // Copyright 2015 High Fidelity, Inc.
7 // Copyright 2024 Overte e.V.
8 //
9 // Distributed under the Apache License, Version 2.0.
10 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
11 //
12 
13 #pragma once
14 #ifndef hifi_ProceduralSkybox_h
15 #define hifi_ProceduralSkybox_h
16 
17 #include <graphics/Skybox.h>
18 
19 #include "Procedural.h"
20 
21 class ProceduralSkybox: public graphics::Skybox {
22 public:
23  ProceduralSkybox(uint64_t created = 0);
24 
25  void parse(const QString& userData) { _procedural.setProceduralData(ProceduralData::parse(userData)); }
26 
27  bool empty() override;
28  void clear() override;
29 
30  void render(gpu::Batch& batch, const ViewFrustum& frustum, bool forward, uint transformSlot) const override;
31  static void render(gpu::Batch& batch, const ViewFrustum& frustum, const ProceduralSkybox& skybox, bool forward, uint transformSlot);
32 
33  uint64_t getCreated() const { return _created; }
34 
35 protected:
36  mutable Procedural _procedural;
37  uint64_t _created;
38 };
39 typedef std::shared_ptr< ProceduralSkybox > ProceduralSkyboxPointer;
40 
41 #endif