Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
rtri committed Oct 6, 2019
1 parent cca6aeb commit 4d8fbc8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions rts/Rendering/GL/RenderDataBuffer.hpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -641,13 +641,13 @@ namespace GL {
void Update(const VertexArrayType* e, size_t ne, size_t pos) { AssertSizeE( ne, pos); std::memcpy(&elemsMap[pos], e, ne * sizeof(VertexArrayType)); } void Update(const VertexArrayType* e, size_t ne, size_t pos) { AssertSizeE( ne, pos); std::memcpy(&elemsMap[pos], e, ne * sizeof(VertexArrayType)); }
void Update(const IndexArrayType* i, size_t ni, size_t pos) { AssertSizeI( ni, pos); std::memcpy(&indcsMap[pos], i, ni * sizeof( IndexArrayType)); } void Update(const IndexArrayType* i, size_t ni, size_t pos) { AssertSizeI( ni, pos); std::memcpy(&indcsMap[pos], i, ni * sizeof( IndexArrayType)); }


bool SafeUpdate(const VertexArrayType& e, size_t pos) { SafeUpdate(&e, 1, pos); } bool SafeUpdate(const VertexArrayType& e, size_t pos) { return SafeUpdate(&e, 1, pos); }
bool SafeUpdate(const VertexArrayType* e, size_t ne, size_t pos) { bool SafeUpdate(const VertexArrayType* e, size_t ne, size_t pos) {
if (elemsMap == nullptr || !CheckSizeE(ne, pos)) if (elemsMap == nullptr || !CheckSizeE(ne, pos))
return false; return false;
return (Update(e, ne, pos), true); return (Update(e, ne, pos), true);
} }
bool SafeUpdate(const IndexArrayType i, size_t pos) { SafeUpdate(&i, 1, pos); } bool SafeUpdate(const IndexArrayType i, size_t pos) { return SafeUpdate(&i, 1, pos); }
bool SafeUpdate(const IndexArrayType* i, size_t ni, size_t pos) { bool SafeUpdate(const IndexArrayType* i, size_t ni, size_t pos) {
if (indcsMap == nullptr || !CheckSizeI(ni, pos)) if (indcsMap == nullptr || !CheckSizeI(ni, pos))
return false; return false;
Expand All @@ -660,14 +660,14 @@ namespace GL {
void Append(const VertexArrayType* e, size_t ne) { Update( e, ne, curElemPos); curElemPos += ne; } void Append(const VertexArrayType* e, size_t ne) { Update( e, ne, curElemPos); curElemPos += ne; }
void Append(const IndexArrayType* i, size_t ni) { Update( i, ni, curIndxPos); curIndxPos += ni; } void Append(const IndexArrayType* i, size_t ni) { Update( i, ni, curIndxPos); curIndxPos += ni; }


void SafeAppend(const VertexArrayType& e ) { SafeAppend(&e, 1); } bool SafeAppend(const VertexArrayType& e ) { return SafeAppend(&e, 1); }
void SafeAppend(const VertexArrayType* e, size_t ne) { bool SafeAppend(const VertexArrayType* e, size_t ne) {
if (elemsMap == nullptr || !CheckSizeE(ne, curElemPos)) if (elemsMap == nullptr || !CheckSizeE(ne, curElemPos))
return false; return false;
return (Append(e, ne), true); return (Append(e, ne), true);
} }
void SafeAppend(const IndexArrayType i ) { SafeAppend(&i, 1); } bool SafeAppend(const IndexArrayType i ) { return SafeAppend(&i, 1); }
void SafeAppend(const IndexArrayType* i, size_t ni) { bool SafeAppend(const IndexArrayType* i, size_t ni) {
if (indcsMap == nullptr || !CheckSizeI(ni, curIndxPos)) if (indcsMap == nullptr || !CheckSizeI(ni, curIndxPos))
return false; return false;
return (Append(i, ni), true); return (Append(i, ni), true);
Expand Down

0 comments on commit 4d8fbc8

Please sign in to comment.