From a455f3a435961b8d2024c8d31dddbe6c9e6aa12c Mon Sep 17 00:00:00 2001 From: Bradley Austin Davis Date: Tue, 26 Jul 2016 15:25:36 -0700 Subject: [PATCH] Add frame concept to gpu library --- libraries/gpu/src/gpu/Forward.h | 4 ++++ libraries/gpu/src/gpu/Frame.cpp | 10 ++++++++++ libraries/gpu/src/gpu/Frame.h | 28 ++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+) create mode 100644 libraries/gpu/src/gpu/Frame.cpp create mode 100644 libraries/gpu/src/gpu/Frame.h diff --git a/libraries/gpu/src/gpu/Forward.h b/libraries/gpu/src/gpu/Forward.h index 7fe6739ff7..e2a4ad38dd 100644 --- a/libraries/gpu/src/gpu/Forward.h +++ b/libraries/gpu/src/gpu/Forward.h @@ -12,6 +12,7 @@ #include #include #include +#include #include @@ -21,6 +22,9 @@ namespace gpu { class Context; using ContextPointer = std::shared_ptr; class GPUObject; + class Frame; + using FramePointer = std::shared_ptr; + using FrameHandler = std::function; using Stamp = int; using uint32 = uint32_t; diff --git a/libraries/gpu/src/gpu/Frame.cpp b/libraries/gpu/src/gpu/Frame.cpp new file mode 100644 index 0000000000..d36c7f5537 --- /dev/null +++ b/libraries/gpu/src/gpu/Frame.cpp @@ -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; diff --git a/libraries/gpu/src/gpu/Frame.h b/libraries/gpu/src/gpu/Frame.h new file mode 100644 index 0000000000..99296cc91e --- /dev/null +++ b/libraries/gpu/src/gpu/Frame.h @@ -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 batches; + /// The destination framebuffer in which the results will be placed + FramebufferPointer framebuffer; +}; + +}; + + +#endif