Subversion Repository Public Repository

Divide-Framework

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

Diff Revisions 868 vs 869 for /trunk/Source Code/Platform/Video/Buffers/VertexBuffer/Headers/VertexBuffer.h

Diff revisions: vs.
  @@ -184,10 +184,34 @@
184 184 }
185 185 }
186 186
187 + template <typename T>
188 + inline void addIndices(const vectorImplBest<T>& indices, bool containsRestartIndex) {
189 + if (usesLargeIndices()) {
190 + std::transform(std::cbegin(indices),
191 + std::cend(indices),
192 + std::back_inserter(_hardwareIndicesL),
193 + static_caster<T, U32>());
194 +
195 + } else {
196 + std::transform(std::cbegin(indices),
197 + std::cend(indices),
198 + std::back_inserter(_hardwareIndicesS),
199 + static_caster<T, U16>());
200 + }
201 +
202 + if (containsRestartIndex) {
203 + hasRestartIndex(true);
204 + }
205 + }
206 +
207 + inline void hasRestartIndex(bool state) {
208 + _primitiveRestartEnabled = state;
209 + }
210 +
187 211 inline void addRestartIndex() {
188 - _primitiveRestartEnabled = true;
212 + hasRestartIndex(true);
189 213 if (usesLargeIndices()) {
190 - addIndex(Config::PRIMITIVE_RESTART_INDEX_L);
214 + addIndex(Config::PRIMITIVE_RESTART_INDEX_L);
191 215 } else {
192 216 addIndex(Config::PRIMITIVE_RESTART_INDEX_S);
193 217 }