diff options
Diffstat (limited to 'linden/indra/newview/llfloateranimpreview.cpp')
-rw-r--r-- | linden/indra/newview/llfloateranimpreview.cpp | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/linden/indra/newview/llfloateranimpreview.cpp b/linden/indra/newview/llfloateranimpreview.cpp index ced7a0e..3661ea2 100644 --- a/linden/indra/newview/llfloateranimpreview.cpp +++ b/linden/indra/newview/llfloateranimpreview.cpp | |||
@@ -280,8 +280,8 @@ BOOL LLFloaterAnimPreview::postBuild() | |||
280 | childSetValue("ease_in_time", LLSD(motionp->getEaseInDuration())); | 280 | childSetValue("ease_in_time", LLSD(motionp->getEaseInDuration())); |
281 | childSetValue("ease_out_time", LLSD(motionp->getEaseOutDuration())); | 281 | childSetValue("ease_out_time", LLSD(motionp->getEaseOutDuration())); |
282 | mEnabled = TRUE; | 282 | mEnabled = TRUE; |
283 | char seconds_string[128]; | 283 | char seconds_string[128]; /*Flawfinder: ignore*/ |
284 | sprintf(seconds_string, " - %.2f seconds", motionp->getDuration()); | 284 | snprintf(seconds_string, sizeof(seconds_string), " - %.2f seconds", motionp->getDuration()); /*Flawfinder: ignore*/ |
285 | 285 | ||
286 | setTitle(mFilename + LLString(seconds_string)); | 286 | setTitle(mFilename + LLString(seconds_string)); |
287 | } | 287 | } |
@@ -301,9 +301,9 @@ BOOL LLFloaterAnimPreview::postBuild() | |||
301 | { | 301 | { |
302 | if (loaderp->getDuration() > MAX_ANIM_DURATION) | 302 | if (loaderp->getDuration() > MAX_ANIM_DURATION) |
303 | { | 303 | { |
304 | char output_str[256]; | 304 | char output_str[256]; /*Flawfinder: ignore*/ |
305 | 305 | ||
306 | sprintf(output_str, "Animation file is %.1f seconds in length.\n\nMaximum animation length is %.1f seconds.\n", | 306 | snprintf(output_str, sizeof(output_str), "Animation file is %.1f seconds in length.\n\nMaximum animation length is %.1f seconds.\n", /*Flawfinder: ignore*/ |
307 | loaderp->getDuration(), MAX_ANIM_DURATION); | 307 | loaderp->getDuration(), MAX_ANIM_DURATION); |
308 | childSetValue("bad_animation_text", LLSD(output_str)); | 308 | childSetValue("bad_animation_text", LLSD(output_str)); |
309 | } | 309 | } |
@@ -1016,7 +1016,7 @@ LLPreviewAnimation::LLPreviewAnimation(S32 width, S32 height) : LLDynamicTexture | |||
1016 | mDummyAvatar->updateGeometry(mDummyAvatar->mDrawable); | 1016 | mDummyAvatar->updateGeometry(mDummyAvatar->mDrawable); |
1017 | mDummyAvatar->startMotion(ANIM_AGENT_STAND, 5.f); | 1017 | mDummyAvatar->startMotion(ANIM_AGENT_STAND, 5.f); |
1018 | mDummyAvatar->mSkirtLOD.setVisible(FALSE, TRUE); | 1018 | mDummyAvatar->mSkirtLOD.setVisible(FALSE, TRUE); |
1019 | gPipeline.markVisible(mDummyAvatar->mDrawable); | 1019 | gPipeline.markVisible(mDummyAvatar->mDrawable, *gCamera); |
1020 | 1020 | ||
1021 | // stop extraneous animations | 1021 | // stop extraneous animations |
1022 | mDummyAvatar->stopMotion( ANIM_AGENT_HEAD_ROT, TRUE ); | 1022 | mDummyAvatar->stopMotion( ANIM_AGENT_HEAD_ROT, TRUE ); |
@@ -1092,6 +1092,10 @@ BOOL LLPreviewAnimation::render() | |||
1092 | avatarp->updateMotion(); | 1092 | avatarp->updateMotion(); |
1093 | } | 1093 | } |
1094 | 1094 | ||
1095 | LLVertexBuffer::stopRender(); | ||
1096 | avatarp->updateLOD(); | ||
1097 | LLVertexBuffer::startRender(); | ||
1098 | |||
1095 | avatarp->mRoot.updateWorldMatrixChildren(); | 1099 | avatarp->mRoot.updateWorldMatrixChildren(); |
1096 | 1100 | ||
1097 | stop_glerror(); | 1101 | stop_glerror(); |
@@ -1101,13 +1105,7 @@ BOOL LLPreviewAnimation::render() | |||
1101 | if (avatarp->mDrawable.notNull()) | 1105 | if (avatarp->mDrawable.notNull()) |
1102 | { | 1106 | { |
1103 | LLDrawPoolAvatar *avatarPoolp = (LLDrawPoolAvatar *)avatarp->mDrawable->getFace(0)->getPool(); | 1107 | LLDrawPoolAvatar *avatarPoolp = (LLDrawPoolAvatar *)avatarp->mDrawable->getFace(0)->getPool(); |
1104 | gPipeline.unbindAGP(); | 1108 | avatarPoolp->renderAvatars(avatarp); // renders only one avatar |
1105 | avatarPoolp->syncAGP(); | ||
1106 | if (avatarPoolp->canUseAGP() && gPipeline.usingAGP()) | ||
1107 | { | ||
1108 | gPipeline.bindAGP(); | ||
1109 | } | ||
1110 | avatarPoolp->renderAvatars(avatarp, TRUE); // renders only one avatar (no shaders) | ||
1111 | } | 1109 | } |
1112 | 1110 | ||
1113 | return TRUE; | 1111 | return TRUE; |