summaryrefslogtreecommitdiff
path: root/indra/llrender/llrender.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2011-09-02 13:48:29 -0400
committerOz Linden <oz@lindenlab.com>2011-09-02 13:48:29 -0400
commit0ab6eee0996c78d32b722157140cea5a21a5e460 (patch)
tree2a0e90651e3cb0e236c9091b33c64d2cb7a616f7 /indra/llrender/llrender.cpp
parentfcc51bd5b01f2a383ad057898484ac9938219b11 (diff)
parent8efd992d508eecec42648af4a7bb980fc0cc19cc (diff)
merge changes for storm-1027
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)