diff options
author | Dave Parks <davep@lindenlab.com> | 2011-03-03 16:15:37 -0600 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2011-03-03 16:15:37 -0600 |
commit | 33d9a577ecf280ddc309479089c6d4d323698dfb (patch) | |
tree | 66e334baf35faf4d6e0048aa4e573f90415b4079 /indra/newview/llvowater.cpp | |
parent | 0a76e7620f3c97571ccd85a0d31392c0235d87ec (diff) | |
parent | 162d467b4a8ca1dae6b16ece1728873d43a287ac (diff) |
merge
Diffstat (limited to 'indra/newview/llvowater.cpp')
-rw-r--r-- | indra/newview/llvowater.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/indra/newview/llvowater.cpp b/indra/newview/llvowater.cpp index 77875859e9..69ebad61ac 100644 --- a/indra/newview/llvowater.cpp +++ b/indra/newview/llvowater.cpp @@ -166,16 +166,18 @@ BOOL LLVOWater::updateGeometry(LLDrawable *drawable) face->setSize(vertices_per_quad * num_quads, indices_per_quad * num_quads); - if (face->mVertexBuffer.isNull()) + LLVertexBuffer* buff = face->getVertexBuffer(); + if (!buff) { - face->mVertexBuffer = new LLVertexBuffer(LLDrawPoolWater::VERTEX_DATA_MASK, GL_DYNAMIC_DRAW_ARB); - face->mVertexBuffer->allocateBuffer(face->getGeomCount(), face->getIndicesCount(), TRUE); + buff = new LLVertexBuffer(LLDrawPoolWater::VERTEX_DATA_MASK, GL_DYNAMIC_DRAW_ARB); + buff->allocateBuffer(face->getGeomCount(), face->getIndicesCount(), TRUE); face->setIndicesIndex(0); face->setGeomIndex(0); + face->setVertexBuffer(buff); } else { - face->mVertexBuffer->resizeBuffer(face->getGeomCount(), face->getIndicesCount()); + buff->resizeBuffer(face->getGeomCount(), face->getIndicesCount()); } index_offset = face->getGeometry(verticesp,normalsp,texCoordsp, indicesp); @@ -229,7 +231,7 @@ BOOL LLVOWater::updateGeometry(LLDrawable *drawable) } } - face->mVertexBuffer->setBuffer(0); + buff->setBuffer(0); mDrawable->movePartition(); LLPipeline::sCompiles++; |