summaryrefslogtreecommitdiff
path: root/indra/llrender/llvertexbuffer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llrender/llvertexbuffer.cpp')
-rw-r--r--indra/llrender/llvertexbuffer.cpp28
1 files changed, 13 insertions, 15 deletions
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index 33f7a6527f..f82ec30242 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -316,7 +316,7 @@ public:
{ //allocate a new buffer
LL_PROFILE_GPU_ZONE("vbo alloc");
- // ON OS X, we don't allocate a VBO until the last possible moment
+ // ON OS X, we don't allocate a VBO until the last possible moment
// in unmapBuffer
data = (U8*) ll_aligned_malloc_16(size);
STOP_GLERROR;
@@ -328,12 +328,12 @@ public:
LL_PROFILE_ZONE_SCOPED_CATEGORY_VERTEX;
llassert(type == GL_ARRAY_BUFFER || type == GL_ELEMENT_ARRAY_BUFFER);
llassert(size >= 2);
-
+
if (data)
{
ll_aligned_free_16(data);
}
-
+
mAllocated -= size;
STOP_GLERROR;
if (name)
@@ -702,7 +702,7 @@ void LLVertexBuffer::drawElements(U32 mode, const LLVector4a* pos, const LLVecto
if (tc != nullptr)
{
- for (int i = 0; i < num_indices; ++i)
+ for (U32 i = 0; i < num_indices; ++i)
{
U16 idx = indicesp[i];
gGL.texCoord2fv(tc[idx].mV);
@@ -711,7 +711,7 @@ void LLVertexBuffer::drawElements(U32 mode, const LLVector4a* pos, const LLVecto
}
else
{
- for (int i = 0; i < num_indices; ++i)
+ for (U32 i = 0; i < num_indices; ++i)
{
U16 idx = indicesp[i];
gGL.vertex3fv(pos[idx].getF32ptr());
@@ -728,19 +728,17 @@ bool LLVertexBuffer::validateRange(U32 start, U32 end, U32 count, U32 indices_of
return true;
}
- llassert(start < (U32)mNumVerts);
- llassert(end < (U32)mNumVerts);
+ llassert(start < mNumVerts);
+ llassert(end < mNumVerts);
- if (start >= (U32) mNumVerts ||
- end >= (U32) mNumVerts)
+ if (start >= mNumVerts ||
+ end >= mNumVerts)
{
LL_ERRS() << "Bad vertex buffer draw range: [" << start << ", " << end << "] vs " << mNumVerts << LL_ENDL;
}
- llassert(mNumIndices >= 0);
-
- if (indices_offset >= (U32) mNumIndices ||
- indices_offset + count > (U32) mNumIndices)
+ if (indices_offset >= mNumIndices ||
+ indices_offset + count > mNumIndices)
{
LL_ERRS() << "Bad index buffer draw range: [" << indices_offset << ", " << indices_offset+count << "]" << LL_ENDL;
}
@@ -778,7 +776,7 @@ bool LLVertexBuffer::validateRange(U32 start, U32 end, U32 count, U32 indices_of
for (U32 i = start; i < end; i++)
{
U32 idx = (U32) (v[i][3]+0.25f);
- if (idx >= shader->mFeatures.mIndexedTextureChannels)
+ if (idx >= (U32)shader->mFeatures.mIndexedTextureChannels)
{
LL_ERRS() << "Bad texture index found in vertex data stream." << LL_ENDL;
}
@@ -1491,7 +1489,7 @@ void LLVertexBuffer::setBuffer()
// no data may be pending
llassert(mMappedVertexRegions.empty());
llassert(mMappedIndexRegions.empty());
-
+
// a shader must be bound
llassert(LLGLSLShader::sCurBoundShaderPtr);