Add frame concept to gpu library

This commit is contained in:
Bradley Austin Davis 2016-07-26 15:25:36 -07:00
parent 5ce681154d
commit a455f3a435
3 changed files with 42 additions and 0 deletions

View file

@ -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;

View 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;

View 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