aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/lldynamictexture.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/lldynamictexture.cpp21
1 files changed, 6 insertions, 15 deletions
diff --git a/linden/indra/newview/lldynamictexture.cpp b/linden/indra/newview/lldynamictexture.cpp
index 4944415..57f4def 100644
--- a/linden/indra/newview/lldynamictexture.cpp
+++ b/linden/indra/newview/lldynamictexture.cpp
@@ -205,8 +205,6 @@ BOOL LLDynamicTexture::updateAllInstances()
205 return TRUE; 205 return TRUE;
206 } 206 }
207 207
208 BOOL started = FALSE;
209
210 BOOL result = FALSE; 208 BOOL result = FALSE;
211 for( S32 order = 0; order < ORDER_COUNT; order++ ) 209 for( S32 order = 0; order < ORDER_COUNT; order++ )
212 { 210 {
@@ -215,29 +213,22 @@ BOOL LLDynamicTexture::updateAllInstances()
215 dynamicTexture = LLDynamicTexture::sInstances[order].getNextData()) 213 dynamicTexture = LLDynamicTexture::sInstances[order].getNextData())
216 { 214 {
217 if (dynamicTexture->needsRender()) 215 if (dynamicTexture->needsRender())
218 { 216 {
219 if (!started) 217 dynamicTexture->preRender(); // Must be called outside of startRender()
220 { 218
221 started = TRUE; 219 LLVertexBuffer::startRender();
222 LLVertexBuffer::startRender();
223 }
224
225 dynamicTexture->preRender();
226 if (dynamicTexture->render()) 220 if (dynamicTexture->render())
227 { 221 {
228 result = TRUE; 222 result = TRUE;
229 sNumRenders++; 223 sNumRenders++;
230 } 224 }
225 LLVertexBuffer::stopRender();
226
231 dynamicTexture->postRender(result); 227 dynamicTexture->postRender(result);
232 } 228 }
233 } 229 }
234 } 230 }
235 231
236 if (started)
237 {
238 LLVertexBuffer::stopRender();
239 }
240
241 return result; 232 return result;
242} 233}
243 234