aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfloateranimpreview.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:34 -0500
committerJacek Antonelli2008-08-15 23:45:34 -0500
commitcd17687f01420952712a500107e0f93e7ab8d5f8 (patch)
treece48c2b706f2c1176290e39fb555fbdf6648ce01 /linden/indra/newview/llfloateranimpreview.cpp
parentSecond Life viewer sources 1.19.0.5 (diff)
downloadmeta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.zip
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.gz
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.bz2
meta-impy-cd17687f01420952712a500107e0f93e7ab8d5f8.tar.xz
Second Life viewer sources 1.19.1.0
Diffstat (limited to 'linden/indra/newview/llfloateranimpreview.cpp')
-rw-r--r--linden/indra/newview/llfloateranimpreview.cpp89
1 files changed, 47 insertions, 42 deletions
diff --git a/linden/indra/newview/llfloateranimpreview.cpp b/linden/indra/newview/llfloateranimpreview.cpp
index 0fed525..0b486b3 100644
--- a/linden/indra/newview/llfloateranimpreview.cpp
+++ b/linden/indra/newview/llfloateranimpreview.cpp
@@ -46,6 +46,7 @@
46#include "llcombobox.h" 46#include "llcombobox.h"
47#include "lldrawable.h" 47#include "lldrawable.h"
48#include "lldrawpoolavatar.h" 48#include "lldrawpoolavatar.h"
49#include "llglimmediate.h"
49#include "llface.h" 50#include "llface.h"
50#include "llkeyframemotion.h" 51#include "llkeyframemotion.h"
51#include "lllineeditor.h" 52#include "lllineeditor.h"
@@ -280,7 +281,7 @@ BOOL LLFloaterAnimPreview::postBuild()
280 childSetValue("hand_pose_combo", LLHandMotion::getHandPoseName(motionp->getHandPose())); 281 childSetValue("hand_pose_combo", LLHandMotion::getHandPoseName(motionp->getHandPose()));
281 childSetValue("ease_in_time", LLSD(motionp->getEaseInDuration())); 282 childSetValue("ease_in_time", LLSD(motionp->getEaseInDuration()));
282 childSetValue("ease_out_time", LLSD(motionp->getEaseOutDuration())); 283 childSetValue("ease_out_time", LLSD(motionp->getEaseOutDuration()));
283 mEnabled = TRUE; 284 setEnabled(TRUE);
284 char seconds_string[128]; /*Flawfinder: ignore*/ 285 char seconds_string[128]; /*Flawfinder: ignore*/
285 snprintf(seconds_string, sizeof(seconds_string), " - %.2f seconds", motionp->getDuration()); /* Flawfinder: ignore */ 286 snprintf(seconds_string, sizeof(seconds_string), " - %.2f seconds", motionp->getDuration()); /* Flawfinder: ignore */
286 287
@@ -291,8 +292,8 @@ BOOL LLFloaterAnimPreview::postBuild()
291 delete mAnimPreview; 292 delete mAnimPreview;
292 mAnimPreview = NULL; 293 mAnimPreview = NULL;
293 mMotionID.setNull(); 294 mMotionID.setNull();
294 childSetValue("bad_animation_text", childGetText("failed_to_initialize")); 295 childSetValue("bad_animation_text", getString("failed_to_initialize"));
295 mEnabled = FALSE; 296 setEnabled(FALSE);
296 } 297 }
297 } 298 }
298 else 299 else
@@ -301,20 +302,20 @@ BOOL LLFloaterAnimPreview::postBuild()
301 { 302 {
302 if (loaderp->getDuration() > MAX_ANIM_DURATION) 303 if (loaderp->getDuration() > MAX_ANIM_DURATION)
303 { 304 {
304 LLUIString out_str = childGetText("anim_too_long"); 305 LLUIString out_str = getString("anim_too_long");
305 out_str.setArg("[LENGTH]", llformat("%.1f", loaderp->getDuration())); 306 out_str.setArg("[LENGTH]", llformat("%.1f", loaderp->getDuration()));
306 out_str.setArg("[MAX_LENGTH]", llformat("%.1f", MAX_ANIM_DURATION)); 307 out_str.setArg("[MAX_LENGTH]", llformat("%.1f", MAX_ANIM_DURATION));
307 childSetValue("bad_animation_text", out_str.getString()); 308 childSetValue("bad_animation_text", out_str.getString());
308 } 309 }
309 else 310 else
310 { 311 {
311 LLUIString out_str = childGetText("failed_file_read"); 312 LLUIString out_str = getString("failed_file_read");
312 out_str.setArg("[STATUS]", loaderp->getStatus()); // *TODO:Translate 313 out_str.setArg("[STATUS]", loaderp->getStatus()); // *TODO:Translate
313 childSetValue("bad_animation_text", out_str.getString()); 314 childSetValue("bad_animation_text", out_str.getString());
314 } 315 }
315 } 316 }
316 317
317 mEnabled = FALSE; 318 setEnabled(FALSE);
318 mMotionID.setNull(); 319 mMotionID.setNull();
319 mAnimPreview = NULL; 320 mAnimPreview = NULL;
320 } 321 }
@@ -334,7 +335,7 @@ LLFloaterAnimPreview::~LLFloaterAnimPreview()
334 delete mAnimPreview; 335 delete mAnimPreview;
335 mAnimPreview = NULL; 336 mAnimPreview = NULL;
336 337
337 mEnabled = FALSE; 338 setEnabled(FALSE);
338} 339}
339 340
340//----------------------------------------------------------------------------- 341//-----------------------------------------------------------------------------
@@ -349,21 +350,21 @@ void LLFloaterAnimPreview::draw()
349 350
350 if (mMotionID.notNull() && mAnimPreview) 351 if (mMotionID.notNull() && mAnimPreview)
351 { 352 {
352 glColor3f(1.f, 1.f, 1.f); 353 gGL.color3f(1.f, 1.f, 1.f);
353 mAnimPreview->bindTexture(); 354 mAnimPreview->bindTexture();
354 355
355 glBegin( GL_QUADS ); 356 gGL.begin( GL_QUADS );
356 { 357 {
357 glTexCoord2f(0.f, 1.f); 358 gGL.texCoord2f(0.f, 1.f);
358 glVertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT); 359 gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT);
359 glTexCoord2f(0.f, 0.f); 360 gGL.texCoord2f(0.f, 0.f);
360 glVertex2i(PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD); 361 gGL.vertex2i(PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
361 glTexCoord2f(1.f, 0.f); 362 gGL.texCoord2f(1.f, 0.f);
362 glVertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD); 363 gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
363 glTexCoord2f(1.f, 1.f); 364 gGL.texCoord2f(1.f, 1.f);
364 glVertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT); 365 gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT);
365 } 366 }
366 glEnd(); 367 gGL.end();
367 368
368 mAnimPreview->unbindTexture(); 369 mAnimPreview->unbindTexture();
369 370
@@ -507,7 +508,7 @@ void LLFloaterAnimPreview::onMouseCaptureLost()
507void LLFloaterAnimPreview::onBtnPlay(void* user_data) 508void LLFloaterAnimPreview::onBtnPlay(void* user_data)
508{ 509{
509 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)user_data; 510 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)user_data;
510 if (!previewp->mEnabled) return; 511 if (!previewp->getEnabled()) return;
511 512
512 if (previewp->mMotionID.notNull() && previewp->mAnimPreview) 513 if (previewp->mMotionID.notNull() && previewp->mAnimPreview)
513 { 514 {
@@ -538,7 +539,7 @@ void LLFloaterAnimPreview::onBtnPlay(void* user_data)
538void LLFloaterAnimPreview::onBtnStop(void* user_data) 539void LLFloaterAnimPreview::onBtnStop(void* user_data)
539{ 540{
540 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)user_data; 541 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)user_data;
541 if (!previewp->mEnabled) return; 542 if (!previewp->getEnabled()) return;
542 543
543 if (previewp->mMotionID.notNull() && previewp->mAnimPreview) 544 if (previewp->mMotionID.notNull() && previewp->mAnimPreview)
544 { 545 {
@@ -563,7 +564,7 @@ void LLFloaterAnimPreview::onBtnStop(void* user_data)
563void LLFloaterAnimPreview::onSliderMove(LLUICtrl* ctrl, void*user_data) 564void LLFloaterAnimPreview::onSliderMove(LLUICtrl* ctrl, void*user_data)
564{ 565{
565 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)user_data; 566 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)user_data;
566 if (!previewp->mEnabled) return; 567 if (!previewp->getEnabled()) return;
567 568
568 if (previewp->mAnimPreview) 569 if (previewp->mAnimPreview)
569 { 570 {
@@ -609,7 +610,7 @@ void LLFloaterAnimPreview::onCommitBaseAnim(LLUICtrl* ctrl, void* data)
609{ 610{
610 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data; 611 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data;
611 612
612 if (!previewp->mEnabled) return; 613 if (!previewp->getEnabled()) return;
613 614
614 if (previewp->mAnimPreview) 615 if (previewp->mAnimPreview)
615 { 616 {
@@ -639,7 +640,7 @@ void LLFloaterAnimPreview::onCommitLoop(LLUICtrl* ctrl, void* data)
639{ 640{
640 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data; 641 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data;
641 642
642 if (!previewp->mEnabled) return; 643 if (!previewp->getEnabled()) return;
643 LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar(); 644 LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar();
644 LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID); 645 LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID);
645 646
@@ -657,7 +658,7 @@ void LLFloaterAnimPreview::onCommitLoop(LLUICtrl* ctrl, void* data)
657void LLFloaterAnimPreview::onCommitLoopIn(LLUICtrl* ctrl, void* data) 658void LLFloaterAnimPreview::onCommitLoopIn(LLUICtrl* ctrl, void* data)
658{ 659{
659 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data; 660 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data;
660 if (!previewp->mEnabled) return; 661 if (!previewp->getEnabled()) return;
661 662
662 LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar(); 663 LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar();
663 LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID); 664 LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID);
@@ -677,7 +678,7 @@ void LLFloaterAnimPreview::onCommitLoopIn(LLUICtrl* ctrl, void* data)
677void LLFloaterAnimPreview::onCommitLoopOut(LLUICtrl* ctrl, void* data) 678void LLFloaterAnimPreview::onCommitLoopOut(LLUICtrl* ctrl, void* data)
678{ 679{
679 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data; 680 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data;
680 if (!previewp->mEnabled) return; 681 if (!previewp->getEnabled()) return;
681 682
682 LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar(); 683 LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar();
683 LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID); 684 LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID);
@@ -697,7 +698,7 @@ void LLFloaterAnimPreview::onCommitLoopOut(LLUICtrl* ctrl, void* data)
697void LLFloaterAnimPreview::onCommitName(LLUICtrl* ctrl, void* data) 698void LLFloaterAnimPreview::onCommitName(LLUICtrl* ctrl, void* data)
698{ 699{
699 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data; 700 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data;
700 if (!previewp->mEnabled) return; 701 if (!previewp->getEnabled()) return;
701 702
702 LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar(); 703 LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar();
703 LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID); 704 LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID);
@@ -716,7 +717,7 @@ void LLFloaterAnimPreview::onCommitName(LLUICtrl* ctrl, void* data)
716void LLFloaterAnimPreview::onCommitHandPose(LLUICtrl* ctrl, void* data) 717void LLFloaterAnimPreview::onCommitHandPose(LLUICtrl* ctrl, void* data)
717{ 718{
718 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data; 719 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data;
719 if (!previewp->mEnabled) return; 720 if (!previewp->getEnabled()) return;
720 721
721 LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar(); 722 LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar();
722 LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID); 723 LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID);
@@ -731,7 +732,7 @@ void LLFloaterAnimPreview::onCommitHandPose(LLUICtrl* ctrl, void* data)
731void LLFloaterAnimPreview::onCommitEmote(LLUICtrl* ctrl, void* data) 732void LLFloaterAnimPreview::onCommitEmote(LLUICtrl* ctrl, void* data)
732{ 733{
733 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data; 734 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data;
734 if (!previewp->mEnabled) return; 735 if (!previewp->getEnabled()) return;
735 736
736 LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar(); 737 LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar();
737 LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID); 738 LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID);
@@ -746,7 +747,7 @@ void LLFloaterAnimPreview::onCommitEmote(LLUICtrl* ctrl, void* data)
746void LLFloaterAnimPreview::onCommitPriority(LLUICtrl* ctrl, void* data) 747void LLFloaterAnimPreview::onCommitPriority(LLUICtrl* ctrl, void* data)
747{ 748{
748 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data; 749 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data;
749 if (!previewp->mEnabled) return; 750 if (!previewp->getEnabled()) return;
750 751
751 LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar(); 752 LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar();
752 LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID); 753 LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID);
@@ -760,7 +761,7 @@ void LLFloaterAnimPreview::onCommitPriority(LLUICtrl* ctrl, void* data)
760void LLFloaterAnimPreview::onCommitEaseIn(LLUICtrl* ctrl, void* data) 761void LLFloaterAnimPreview::onCommitEaseIn(LLUICtrl* ctrl, void* data)
761{ 762{
762 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data; 763 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data;
763 if (!previewp->mEnabled) return; 764 if (!previewp->getEnabled()) return;
764 765
765 LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar(); 766 LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar();
766 LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID); 767 LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID);
@@ -775,7 +776,7 @@ void LLFloaterAnimPreview::onCommitEaseIn(LLUICtrl* ctrl, void* data)
775void LLFloaterAnimPreview::onCommitEaseOut(LLUICtrl* ctrl, void* data) 776void LLFloaterAnimPreview::onCommitEaseOut(LLUICtrl* ctrl, void* data)
776{ 777{
777 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data; 778 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data;
778 if (!previewp->mEnabled) return; 779 if (!previewp->getEnabled()) return;
779 780
780 LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar(); 781 LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar();
781 LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID); 782 LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID);
@@ -791,7 +792,7 @@ BOOL LLFloaterAnimPreview::validateEaseIn(LLUICtrl* spin, void* data)
791{ 792{
792 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data; 793 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data;
793 794
794 if (!previewp->mEnabled) return FALSE; 795 if (!previewp->getEnabled()) return FALSE;
795 796
796 LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar(); 797 LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar();
797 LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID); 798 LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID);
@@ -812,7 +813,7 @@ BOOL LLFloaterAnimPreview::validateEaseOut(LLUICtrl* spin, void* data)
812{ 813{
813 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data; 814 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data;
814 815
815 if (!previewp->mEnabled) return FALSE; 816 if (!previewp->getEnabled()) return FALSE;
816 817
817 LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar(); 818 LLVOAvatar* avatarp = previewp->mAnimPreview->getDummyAvatar();
818 LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID); 819 LLKeyframeMotion* motionp = (LLKeyframeMotion*)avatarp->findMotion(previewp->mMotionID);
@@ -833,7 +834,7 @@ BOOL LLFloaterAnimPreview::validateLoopIn(LLUICtrl* ctrl, void* data)
833{ 834{
834 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data; 835 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data;
835 836
836 if (!previewp->mEnabled) return FALSE; 837 if (!previewp->getEnabled()) return FALSE;
837 838
838 F32 loop_in_value = (F32)previewp->childGetValue("loop_in_point").asReal(); 839 F32 loop_in_value = (F32)previewp->childGetValue("loop_in_point").asReal();
839 F32 loop_out_value = (F32)previewp->childGetValue("loop_out_point").asReal(); 840 F32 loop_out_value = (F32)previewp->childGetValue("loop_out_point").asReal();
@@ -862,7 +863,7 @@ BOOL LLFloaterAnimPreview::validateLoopOut(LLUICtrl* spin, void* data)
862{ 863{
863 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data; 864 LLFloaterAnimPreview* previewp = (LLFloaterAnimPreview*)data;
864 865
865 if (!previewp->mEnabled) return FALSE; 866 if (!previewp->getEnabled()) return FALSE;
866 867
867 F32 loop_out_value = (F32)previewp->childGetValue("loop_out_point").asReal(); 868 F32 loop_out_value = (F32)previewp->childGetValue("loop_out_point").asReal();
868 F32 loop_in_value = (F32)previewp->childGetValue("loop_in_point").asReal(); 869 F32 loop_in_value = (F32)previewp->childGetValue("loop_in_point").asReal();
@@ -947,7 +948,7 @@ void LLFloaterAnimPreview::refresh()
947void LLFloaterAnimPreview::onBtnOK(void* userdata) 948void LLFloaterAnimPreview::onBtnOK(void* userdata)
948{ 949{
949 LLFloaterAnimPreview* floaterp = (LLFloaterAnimPreview*)userdata; 950 LLFloaterAnimPreview* floaterp = (LLFloaterAnimPreview*)userdata;
950 if (!floaterp->mEnabled) return; 951 if (!floaterp->getEnabled()) return;
951 952
952 if (floaterp->mAnimPreview) 953 if (floaterp->mAnimPreview)
953 { 954 {
@@ -1040,25 +1041,27 @@ BOOL LLPreviewAnimation::render()
1040 LLVOAvatar* avatarp = mDummyAvatar; 1041 LLVOAvatar* avatarp = mDummyAvatar;
1041 1042
1042 glMatrixMode(GL_PROJECTION); 1043 glMatrixMode(GL_PROJECTION);
1043 glPushMatrix(); 1044 gGL.pushMatrix();
1044 glLoadIdentity(); 1045 glLoadIdentity();
1045 glOrtho(0.0f, mWidth, 0.0f, mHeight, -1.0f, 1.0f); 1046 glOrtho(0.0f, mWidth, 0.0f, mHeight, -1.0f, 1.0f);
1046 1047
1047 glMatrixMode(GL_MODELVIEW); 1048 glMatrixMode(GL_MODELVIEW);
1048 glPushMatrix(); 1049 gGL.pushMatrix();
1049 glLoadIdentity(); 1050 glLoadIdentity();
1050 1051
1051 LLGLSUIDefault def; 1052 LLGLSUIDefault def;
1052 LLGLSNoTexture gls_no_texture; 1053 LLGLSNoTexture gls_no_texture;
1053 glColor4f(0.15f, 0.2f, 0.3f, 1.f); 1054 gGL.color4f(0.15f, 0.2f, 0.3f, 1.f);
1054 1055
1055 gl_rect_2d_simple( mWidth, mHeight ); 1056 gl_rect_2d_simple( mWidth, mHeight );
1056 1057
1057 glMatrixMode(GL_PROJECTION); 1058 glMatrixMode(GL_PROJECTION);
1058 glPopMatrix(); 1059 gGL.popMatrix();
1059 1060
1060 glMatrixMode(GL_MODELVIEW); 1061 glMatrixMode(GL_MODELVIEW);
1061 glPopMatrix(); 1062 gGL.popMatrix();
1063
1064 gGL.stop();
1062 1065
1063 LLVector3 target_pos = avatarp->mRoot.getWorldPosition(); 1066 LLVector3 target_pos = avatarp->mRoot.getWorldPosition();
1064 1067
@@ -1105,7 +1108,8 @@ BOOL LLPreviewAnimation::render()
1105 LLDrawPoolAvatar *avatarPoolp = (LLDrawPoolAvatar *)avatarp->mDrawable->getFace(0)->getPool(); 1108 LLDrawPoolAvatar *avatarPoolp = (LLDrawPoolAvatar *)avatarp->mDrawable->getFace(0)->getPool();
1106 avatarPoolp->renderAvatars(avatarp); // renders only one avatar 1109 avatarPoolp->renderAvatars(avatarp); // renders only one avatar
1107 } 1110 }
1108 1111
1112 gGL.start();
1109 return TRUE; 1113 return TRUE;
1110} 1114}
1111 1115
@@ -1153,3 +1157,4 @@ void LLPreviewAnimation::pan(F32 right, F32 up)
1153} 1157}
1154 1158
1155 1159
1160