summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2010-10-19 14:16:00 -0500
committerDave Parks <davep@lindenlab.com>2010-10-19 14:16:00 -0500
commit8d8860d5b2b15c72655ddd2b3f99ccb809171425 (patch)
tree6f0bef01baaf13329bc9302cb05e04ab4d2d1995 /indra/newview
parenta045261002963fce7a719c9bcffee396aef821ca (diff)
Make preview render match what will be uploaded (exposes transform changes between LODs)
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloatermodelpreview.cpp22
1 files changed, 15 insertions, 7 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index d067970806..bdccb09d88 100644
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -3398,23 +3398,31 @@ BOOL LLModelPreview::render()
if (!avatar_preview)
{
- for (LLModelLoader::scene::iterator iter = mScene[mPreviewLOD].begin(); iter != mScene[mPreviewLOD].end(); ++iter)
+ //for (LLModelLoader::scene::iterator iter = mScene[mPreviewLOD].begin(); iter != mScene[mPreviewLOD].end(); ++iter)
+ for (LLMeshUploadThread::instance_list::iterator iter = mUploadData.begin(); iter != mUploadData.end(); ++iter)
{
+ LLModelInstance& instance = *iter;
+
gGL.pushMatrix();
- LLMatrix4 mat = iter->first;
+ LLMatrix4 mat = instance.mTransform;
glMultMatrixf((GLfloat*) mat.mMatrix);
- for (LLModelLoader::model_instance_list::iterator model_iter = iter->second.begin(); model_iter != iter->second.end(); ++model_iter)
+ //for (LLModelLoader::model_instance_list::iterator model_iter = iter->second.begin(); model_iter != iter->second.end(); ++model_iter)
{
- LLModelInstance& instance = *model_iter;
- LLModel* model = instance.mModel;
+ //LLModelInstance& instance = *model_iter;
+ LLModel* model = instance.mLOD[mPreviewLOD];
- if (instance.mTransform != mat)
+ if (!model)
{
- llerrs << "WTF?" << llendl;
+ continue;
}
+ //if (instance.mTransform != mat)
+ //{
+ // llerrs << "WTF?" << llendl;
+ //}
+
if (render_mesh)
{
for (U32 i = 0; i < mVertexBuffer[mPreviewLOD][model].size(); ++i)