NDEVR
API Documentation
GraphicsPipeline.h
1/*--------------------------------------------------------------------------------------------
2Copyright (c) 2019, NDEVR LLC
3tyler.parke@ndevr.org
4 __ __ ____ _____ __ __ _______
5 | \ | | | __ \ | ___|\ \ / / | __ \
6 | \ | | | | \ \ | |___ \ \ / / | |__) |
7 | . \| | | |__/ / | |___ \ V / | _ /
8 | |\ |_|_____/__|_____|___\_/____| | \ \
9 |__| \__________________________________| \__\
10
11Subject to the terms of the Enterprise+ Agreement, NDEVR hereby grants
12Licensee a limited, non-exclusive, non-transferable, royalty-free license
13(without the right to sublicense) to use the API solely for the purpose of
14Licensee's internal development efforts to develop applications for which
15the API was provided.
16
17The above copyright notice and this permission notice shall be included in all
18copies or substantial portions of the Software.
19
20THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
21INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
22PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
23FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25DEALINGS IN THE SOFTWARE.
26
27Library: Graphics
28File: Pipeline
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include <NDEVR/Pointer.h>
34namespace NDEVR
35{
37 class Log;
38 class WindowInstance;
39 class GraphicsSession;
40 class GraphicsDevice;
41 template<class t_type>
42 class ConstPointer;
48 class NDEVR_GRAPHICS_API GraphicsPipeline
49 {
50 public:
52 virtual ~GraphicsPipeline(){};
56 virtual bool runCommand(GraphicsUpdateArguments& args) = 0;
59 virtual void commit(GraphicsUpdateArguments& args) = 0;
66 virtual bool createPipeline(GraphicsUpdateArguments& args) = 0;
69 virtual const ConstPointer<GraphicsDevice>& device() const = 0;
75 virtual bool hasCommand() const = 0;
78 virtual void drawFrame(GraphicsUpdateArguments& args) = 0;
80 virtual void ensureLastRenderComplete() = 0;
82 virtual void cleanup() = 0;
85 virtual void setWindowInstance(WindowInstance* instance) = 0;
87 virtual void cleanResources() = 0;
90 virtual void init(GraphicsUpdateArguments& args) = 0;
91 };
92}
Provides a constant, unmodifiable pointer that has shared ownership of a dynamically allocated object...
Definition Pointer.hpp:276
Provides a modifiable pointer that has shared ownership of a dynamically allocated object.
Definition Pointer.hpp:356
A physical or virtual device used with the NDEVR Rendering Engine.
A GraphicsPipeline is a set of resources that are chained together to correctly render something.
virtual const ConstPointer< GraphicsDevice > & device() const =0
Returns the graphics device (const).
virtual bool createPipeline(GraphicsUpdateArguments &args)=0
Creates or recreates the rendering pipeline.
virtual ~GraphicsPipeline()
Destructor.
virtual void cleanup()=0
Releases all GPU resources.
virtual void ensureLastRenderComplete()=0
Blocks until the last submitted render is complete.
virtual bool hasCommand() const =0
Checks whether there are pending commands to execute.
virtual void setWindowInstance(WindowInstance *instance)=0
Associates a window instance with this pipeline.
virtual const DynamicPointer< GraphicsDevice > & device()=0
Returns the graphics device.
virtual void init(GraphicsUpdateArguments &args)=0
Initializes the pipeline with the given arguments.
virtual void drawFrame(GraphicsUpdateArguments &args)=0
Renders a single frame.
virtual void cleanResources()=0
Cleans up stale or unused GPU resources.
virtual bool runCommand(GraphicsUpdateArguments &args)=0
Executes a queued rendering command.
virtual void updateUniformBuffer(GraphicsUpdateArguments &args)=0
Updates the camera uniform buffer on the GPU.
virtual void commit(GraphicsUpdateArguments &args)=0
Commits pending changes to the GPU.
A GraphicsPipeline that is responsible for setting up and rendering the resources of a DesignObjectLo...
Options that are used for performing an update on a Graphics Engine call.
Serves as the primary program interface for processes to report issues and allows any number of LogSt...
Definition Log.h:50
Contains core information about a Viewport.
The primary namespace for the NDEVR SDK.