mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 15:43:50 +02:00
Add frame concept to gpu library
This commit is contained in:
parent
5ce681154d
commit
a455f3a435
3 changed files with 42 additions and 0 deletions
|
@ -12,6 +12,7 @@
|
|||
#include <stdint.h>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include <functional>
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
|
||||
|
@ -21,6 +22,9 @@ namespace gpu {
|
|||
class Context;
|
||||
using ContextPointer = std::shared_ptr<Context>;
|
||||
class GPUObject;
|
||||
class Frame;
|
||||
using FramePointer = std::shared_ptr<Frame>;
|
||||
using FrameHandler = std::function<void(Frame& frame)>;
|
||||
|
||||
using Stamp = int;
|
||||
using uint32 = uint32_t;
|
||||
|
|
10
libraries/gpu/src/gpu/Frame.cpp
Normal file
10
libraries/gpu/src/gpu/Frame.cpp
Normal file
|
@ -0,0 +1,10 @@
|
|||
//
|
||||
// Created by Bradley Austin Davis on 2016/07/26
|
||||
// Copyright 2013-2016 High Fidelity, Inc.
|
||||
//
|
||||
// Distributed under the Apache License, Version 2.0.
|
||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
#include "Frame.h"
|
||||
|
||||
using namespace gpu;
|
28
libraries/gpu/src/gpu/Frame.h
Normal file
28
libraries/gpu/src/gpu/Frame.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
//
|
||||
// Created by Bradley Austin Davis on 2016/07/26
|
||||
// Copyright 2013-2016 High Fidelity, Inc.
|
||||
//
|
||||
// Distributed under the Apache License, Version 2.0.
|
||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
#ifndef hifi_gpu_Frame_h
|
||||
#define hifi_gpu_Frame_h
|
||||
|
||||
#include "Forward.h"
|
||||
|
||||
namespace gpu {
|
||||
|
||||
class Frame {
|
||||
public:
|
||||
/// The sensor pose used for rendering the frame, only applicable for HMDs
|
||||
glm::mat4 pose;
|
||||
/// The collection of batches which make up the frame
|
||||
std::vector<Batch> batches;
|
||||
/// The destination framebuffer in which the results will be placed
|
||||
FramebufferPointer framebuffer;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
Loading…
Reference in a new issue