Overte C++ Documentation
ApplicationOverlay.h
1 //
2 // ApplicationOverlay.h
3 // interface/src/ui/overlays
4 //
5 // Created by Benjamin Arnold on 5/27/14.
6 // Copyright 2014 High Fidelity, Inc.
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_ApplicationOverlay_h
13 #define hifi_ApplicationOverlay_h
14 
15 #include <gpu/Texture.h>
16 #include <render/Args.h>
17 
18 
19 // Handles the drawing of the overlays to the screen
20 // TODO, move divide up the rendering, displaying and input handling
21 // facilities of this class
22 class ApplicationOverlay : public QObject {
23  Q_OBJECT
24 public:
25  ApplicationOverlay();
26  ~ApplicationOverlay();
27 
28  void renderOverlay(RenderArgs* renderArgs);
29 
30  gpu::TexturePointer getOverlayTexture();
31 
32  bool enabled() const { return _enabled; }
33  void setEnabled(bool enabled) { _enabled = enabled; }
34 
35 private:
36  void renderDomainConnectionStatusBorder(RenderArgs* renderArgs);
37  void renderQmlUi(RenderArgs* renderArgs);
38  void renderOverlays(RenderArgs* renderArgs);
39  void buildFramebufferObject();
40 
41  int _domainStatusBorder;
42  int _magnifierBorder;
43 
44  gpu::TexturePointer _uiTexture;
45  gpu::TexturePointer _overlayDepthTexture;
46  gpu::TexturePointer _overlayColorTexture;
47  gpu::FramebufferPointer _overlayFramebuffer;
48  int _qmlGeometryId { 0 };
49 
50  bool _enabled { true };
51 };
52 
53 #endif // hifi_ApplicationOverlay_h