summaryrefslogtreecommitdiff
path: root/indra/llrender/llrender.cpp
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2011-08-31 11:15:02 -0600
committerXiaohong Bao <bao@lindenlab.com>2011-08-31 11:15:02 -0600
commit1379188c82a49617782288a61f1c3908d8738a3e (patch)
tree8a0c020aa8f6ab9ab2b62bfff01cd67e9c34bd32 /indra/llrender/llrender.cpp
parente62a4d4ec151e81f4dc68b29a009596d3d154d57 (diff)
parente547c36e2562589c120bb23ee88308e21a826cd1 (diff)
Automated merge with http://hg.secondlife.com/viewer-development
Diffstat (limited to 'indra/llrender/llrender.cpp')
-rw-r--r--indra/llrender/llrender.cpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp
index d72918b15d..edcc47aa14 100644
--- a/indra/llrender/llrender.cpp
+++ b/indra/llrender/llrender.cpp
@@ -927,13 +927,7 @@ LLRender::LLRender()
mMode(LLRender::TRIANGLES),
mCurrTextureUnitIndex(0),
mMaxAnisotropy(0.f)
-{
- mBuffer = new LLVertexBuffer(immediate_mask, 0);
- mBuffer->allocateBuffer(4096, 0, TRUE);
- mBuffer->getVertexStrider(mVerticesp);
- mBuffer->getTexCoord0Strider(mTexcoordsp);
- mBuffer->getColorStrider(mColorsp);
-
+{
mTexUnits.reserve(LL_NUM_TEXTURE_LAYERS);
for (U32 i = 0; i < LL_NUM_TEXTURE_LAYERS; i++)
{
@@ -964,6 +958,17 @@ LLRender::~LLRender()
shutdown();
}
+void LLRender::init()
+{
+ llassert_always(mBuffer.isNull()) ;
+
+ mBuffer = new LLVertexBuffer(immediate_mask, 0);
+ mBuffer->allocateBuffer(4096, 0, TRUE);
+ mBuffer->getVertexStrider(mVerticesp);
+ mBuffer->getTexCoord0Strider(mTexcoordsp);
+ mBuffer->getColorStrider(mColorsp);
+}
+
void LLRender::shutdown()
{
for (U32 i = 0; i < mTexUnits.size(); i++)
@@ -979,6 +984,7 @@ void LLRender::shutdown()
delete mLightState[i];
}
mLightState.clear();
+ mBuffer = NULL ;
}
void LLRender::refreshState(void)