Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 892 vs 893 for /trunk/Source Code/Platform/Video/Headers/IMPrimitive.h

Diff revisions: vs.
  @@ -35,15 +35,14 @@
35 35 #include "Utility/Headers/Colours.h"
36 36 #include "Core/Math/Headers/Line.h"
37 37 #include "Core/Math/Headers/MathMatrices.h"
38 + #include "Platform/Video/Headers/Pipeline.h"
38 39 #include "Platform/Video/Headers/GraphicsResource.h"
39 40 #include "Platform/Video/Buffers/VertexBuffer/Headers/VertexDataInterface.h"
40 41
41 42 namespace Divide {
42 43
43 44 class Texture;
44 - class ShaderProgram;
45 45 enum class PrimitiveType : U32;
46 - FWD_DECLARE_MANAGED_CLASS(ShaderProgram)
47 46
48 47 FWD_DECLARE_MANAGED_CLASS(IMPrimitive);
49 48
  @@ -73,11 +72,12 @@
73 72 }
74 73 }
75 74
76 - inline const ShaderProgram_ptr& drawShader() const {
77 - return _drawShader;
75 + inline const Pipeline& pipeline() const {
76 + return _pipeline;
78 77 }
79 78
80 - virtual void drawShader(const ShaderProgram_ptr& shaderProgram);
79 + virtual void pipeline(const Pipeline& pipeline);
80 +
81 81 virtual void draw(const GenericDrawCommand& command) = 0;
82 82
83 83 inline I32 getLastDrawPrimitiveCount() const override {
  @@ -117,10 +117,6 @@
117 117 return (!_setupStates && !_resetStates);
118 118 }
119 119
120 - /// State management
121 - inline size_t stateHash() const { return _stateHash; }
122 - inline void stateHash(size_t hashValue) { _stateHash = hashValue; }
123 -
124 120 inline const mat4<F32>& worldMatrix() const { return _worldMatrix; }
125 121 inline void worldMatrix(const mat4<F32>& worldMatrix) {
126 122 _worldMatrix.set(worldMatrix);
  @@ -160,7 +156,7 @@
160 156
161 157 public:
162 158
163 - ShaderProgram_ptr _drawShader;
159 + Pipeline _pipeline;
164 160 Texture* _texture;
165 161
166 162 protected:
  @@ -175,8 +171,6 @@
175 171 /// 2 functions used to setup or reset states
176 172 DELEGATE_CBK<void> _setupStates;
177 173 DELEGATE_CBK<void> _resetStates;
178 - /// The state hash associated with this render instance
179 - size_t _stateHash;
180 174 /// The transform matrix for this element
181 175 mat4<F32> _worldMatrix;
182 176 };