diff options
author | Tofu Buzzard <no-email> | 2011-03-03 17:41:11 -0800 |
---|---|---|
committer | Tofu Buzzard <no-email> | 2011-03-03 17:41:11 -0800 |
commit | cc61ad696e6947111f61453daf9840415045c64f (patch) | |
tree | 4be5916a3d59bdaa6bd088fb16987e03ab297bae /indra/newview/llvowater.cpp | |
parent | e0099952942595f4ff90fd66cfeea570c17a81c5 (diff) | |
parent | 30763ec707bb65214420c230706d408420a5cb80 (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++; |