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 {
22 
23 class Pipeline {
24 public:
25  using Pointer = std::shared_ptr< Pipeline >;
26 
27  static Pointer create(const ShaderPointer& program, const StatePointer& state);
28  ~Pipeline();
29 
30  const ShaderPointer& getProgram() const { return _program; }
31 
32  const StatePointer& getState() const { return _state; }
33 
34  const GPUObjectPointer gpuObject {};
35 
36 protected:
37  ShaderPointer _program;
38  StatePointer _state;
39 
40  Pipeline();
41 };
42 
43 typedef Pipeline::Pointer PipelinePointer;
44 typedef std::vector< PipelinePointer > Pipelines;
45 
46 };
47 
48 
49 #endif