Overte C++ Documentation
gpu/src/gpu/Frame.h
1 //
2 // Created by Bradley Austin Davis on 2016/07/26
3 // Copyright 2013-2016 High Fidelity, Inc.
4 //
5 // Distributed under the Apache License, Version 2.0.
6 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
7 //
8 #ifndef hifi_gpu_Frame_h
9 #define hifi_gpu_Frame_h
10 
11 #include <functional>
12 #include <queue>
13 
14 #include "Forward.h"
15 #include "Batch.h"
16 #include "Resource.h"
17 
18 namespace gpu {
19 
20  class Frame {
21  friend class Context;
22  friend class Backend;
23 
24  public:
25  Frame();
26  virtual ~Frame();
27  using Batches = std::vector<BatchPointer>;
28  using FramebufferRecycler = std::function<void(const FramebufferPointer&)>;
29  using OverlayRecycler = std::function<void(const TexturePointer&)>;
30 
31  StereoState stereoState;
32  uint32_t frameIndex{ 0 };
33  // TODO: view doesn't seem to be used anywhere?
35  Mat4 view;
37  Mat4 pose;
39  Batches batches;
41  BufferUpdates bufferUpdates;
43  FramebufferPointer framebuffer;
45  FramebufferRecycler framebufferRecycler;
46 
47  std::queue<std::tuple<std::function<void(const QImage&)>, float, bool>> snapshotOperators;
48 
49  protected:
50  friend class Deserializer;
51 
58  void finish();
59 
64  void preRender();
65  };
66 
67 };
68 
69 
70 #endif
Provides the Mat4 scripting interface.
Definition: Mat4.h:44