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/llvoground.cpp | |
parent | e0099952942595f4ff90fd66cfeea570c17a81c5 (diff) | |
parent | 30763ec707bb65214420c230706d408420a5cb80 (diff) |
merge
Diffstat (limited to 'indra/newview/llvoground.cpp')
-rw-r--r-- | indra/newview/llvoground.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/indra/newview/llvoground.cpp b/indra/newview/llvoground.cpp index f032ae8780..ce256fdedf 100644 --- a/indra/newview/llvoground.cpp +++ b/indra/newview/llvoground.cpp @@ -97,13 +97,14 @@ BOOL LLVOGround::updateGeometry(LLDrawable *drawable) drawable->addFace(poolp, NULL); face = drawable->getFace(0); - if (face->mVertexBuffer.isNull()) + if (!face->getVertexBuffer()) { face->setSize(5, 12); - face->mVertexBuffer = new LLVertexBuffer(LLDrawPoolGround::VERTEX_DATA_MASK, GL_STREAM_DRAW_ARB); - face->mVertexBuffer->allocateBuffer(face->getGeomCount(), face->getIndicesCount(), TRUE); + LLVertexBuffer* buff = new LLVertexBuffer(LLDrawPoolGround::VERTEX_DATA_MASK, GL_STREAM_DRAW_ARB); + buff->allocateBuffer(face->getGeomCount(), face->getIndicesCount(), TRUE); face->setGeomIndex(0); face->setIndicesIndex(0); + face->setVertexBuffer(buff); } index_offset = face->getGeometry(verticesp,normalsp,texCoordsp, indicesp); @@ -161,7 +162,7 @@ BOOL LLVOGround::updateGeometry(LLDrawable *drawable) *(texCoordsp++) = LLVector2(0.f, 1.f); *(texCoordsp++) = LLVector2(0.5f, 0.5f); - face->mVertexBuffer->setBuffer(0); + face->getVertexBuffer()->setBuffer(0); LLPipeline::sCompiles++; return TRUE; } |