Subversion Repository Public Repository

Divide-Framework

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

Diff Revisions 330 vs 331 for /trunk/Source Code/Hardware/Video/Shaders/Headers/ShaderProgram.h

Diff revisions: vs.
  @@ -71,15 +71,23 @@
71 71 inline void Uniform(const stringImpl& ext, const vec2<U16>& value) { Uniform(cachedLoc(ext), value); }
72 72 inline void Uniform(const stringImpl& ext, const vec3<F32>& value) { Uniform(cachedLoc(ext), value); }
73 73 inline void Uniform(const stringImpl& ext, const vec4<F32>& value) { Uniform(cachedLoc(ext), value); }
74 - inline void Uniform(const stringImpl& ext, const mat3<F32>& value, bool rowMajor = false) { Uniform(cachedLoc(ext), value, rowMajor); }
75 - inline void Uniform(const stringImpl& ext, const mat4<F32>& value, bool rowMajor = false) { Uniform(cachedLoc(ext), value, rowMajor); }
74 + inline void Uniform(const stringImpl& ext, const mat3<F32>& value, bool rowMajor = false) {
75 + Uniform(cachedLoc(ext), value, rowMajor);
76 + }
77 + inline void Uniform(const stringImpl& ext, const mat4<F32>& value, bool rowMajor = false) {
78 + Uniform(cachedLoc(ext), value, rowMajor);
79 + }
76 80 inline void Uniform(const stringImpl& ext, const vectorImpl<I32 >& values) { Uniform(cachedLoc(ext), values); }
77 81 inline void Uniform(const stringImpl& ext, const vectorImpl<F32 >& values) { Uniform(cachedLoc(ext), values); }
78 82 inline void Uniform(const stringImpl& ext, const vectorImpl<vec2<F32> >& values) { Uniform(cachedLoc(ext), values); }
79 83 inline void Uniform(const stringImpl& ext, const vectorImpl<vec3<F32> >& values) { Uniform(cachedLoc(ext), values); }
80 84 inline void Uniform(const stringImpl& ext, const vectorImpl<vec4<F32> >& values) { Uniform(cachedLoc(ext), values); }
81 - inline void Uniform(const stringImpl& ext, const vectorImpl<mat3<F32> >& values, bool rowMajor = false) { Uniform(cachedLoc(ext), values, rowMajor); }
82 - inline void Uniform(const stringImpl& ext, const vectorImpl<mat4<F32> >& values, bool rowMajor = false) { Uniform(cachedLoc(ext), values, rowMajor); }
85 + inline void Uniform(const stringImpl& ext, const vectorImpl<mat3<F32> >& values, bool rowMajor = false) {
86 + Uniform(cachedLoc(ext), values, rowMajor);
87 + }
88 + inline void Uniform(const stringImpl& ext, const vectorImpl<mat4<F32> >& values, bool rowMajor = false) {
89 + Uniform(cachedLoc(ext), values, rowMajor);
90 + }
83 91 ///Uniform Texture
84 92 inline void UniformTexture(const stringImpl& ext, U16 slot) { UniformTexture(cachedLoc(ext), slot); }
85 93 ///Subroutine
  @@ -125,7 +133,11 @@
125 133 ///Is the shader ready for drawing?
126 134 virtual bool isValid() const = 0;
127 135 /// Calling recompile will re-create the marked shaders from source files and update them in the ShaderManager if needed
128 - void recompile(const bool vertex, const bool fragment, const bool geometry = false, const bool tessellation = false, const bool compute = false);
136 + void recompile(const bool vertex,
137 + const bool fragment,
138 + const bool geometry = false,
139 + const bool tessellation = false,
140 + const bool compute = false);
129 141 /// Add a define to the shader. The defined must not have been added previously
130 142 void addShaderDefine(const stringImpl& define);
131 143 /// Remove a define from the shader. The defined must have been added previously
  @@ -155,10 +167,12 @@
155 167 inline void setFunctionIndex(ShaderType shader, U8 LoD, U32 index, U32 functionEntry){
156 168 if(_functionIndex[shader][LoD].empty()) return;
157 169
158 - DIVIDE_ASSERT(index < _functionIndex[shader][LoD].size(), "ShaderProgram error: Invalid function index specified for update!");
170 + DIVIDE_ASSERT(index < _functionIndex[shader][LoD].size(),
171 + "ShaderProgram error: Invalid function index specified for update!");
159 172 if(_availableFunctionIndex[shader].empty()) return;
160 173
161 - DIVIDE_ASSERT(functionEntry < _availableFunctionIndex[shader].size(), "ShaderProgram error: Specified function entry does not exist!");
174 + DIVIDE_ASSERT(functionEntry < _availableFunctionIndex[shader].size(),
175 + "ShaderProgram error: Specified function entry does not exist!");
162 176 _functionIndex[shader][LoD][index] = _availableFunctionIndex[shader][functionEntry];
163 177 }
164 178