Overte C++ Documentation
Pipeline.h
1 //
2 // Pipeline.h
3 // libraries/gpu/src/gpu
4 //
5 // Created by Sam Gateau on 3/8/2015.
6 // Copyright 2014 High Fidelity, Inc.
7 //
8 // Distributed under the Apache License, Version 2.0.
9 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
10 //
11 #ifndef hifi_gpu_Pipeline_h
12 #define hifi_gpu_Pipeline_h
13 
14 #include "Resource.h"
15 #include <memory>
16 #include <set>
17 
18 #include "Shader.h"
19 #include "State.h"
20 
21 namespace gpu {
25 class Pipeline {
26 public:
27  using Pointer = std::shared_ptr< Pipeline >;
28 
36  static Pointer create(const ShaderPointer& program, const StatePointer& state);
37  ~Pipeline();
38 
42  const ShaderPointer& getProgram() const { return _program; }
43 
47  const StatePointer& getState() const { return _state; }
48 
51 
52 protected:
54  ShaderPointer _program;
55 
57  StatePointer _state;
58 
59  Pipeline();
60 };
61 
62 typedef Pipeline::Pointer PipelinePointer;
63 typedef std::vector< PipelinePointer > Pipelines;
64 
65 };
66 
67 
68 #endif
Definition: gpu/src/gpu/Forward.h:134
Definition: Pipeline.h:25
const GPUObjectPointer gpuObject
Graphics API-specific object representing the pipeline.
Definition: Pipeline.h:50
ShaderPointer _program
Vertex and fragment shader.
Definition: Pipeline.h:54
const ShaderPointer & getProgram() const
Definition: Pipeline.h:42
const StatePointer & getState() const
Definition: Pipeline.h:47
static Pointer create(const ShaderPointer &program, const StatePointer &state)
Creates new pipeline.
Definition: Pipeline.cpp:26
StatePointer _state
Pipeline setup.
Definition: Pipeline.h:57