aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfloaterimagepreview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llfloaterimagepreview.cpp')
-rw-r--r--linden/indra/newview/llfloaterimagepreview.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/linden/indra/newview/llfloaterimagepreview.cpp b/linden/indra/newview/llfloaterimagepreview.cpp
index 926a117..7b1c8cc 100644
--- a/linden/indra/newview/llfloaterimagepreview.cpp
+++ b/linden/indra/newview/llfloaterimagepreview.cpp
@@ -52,7 +52,7 @@
52#include "llviewerwindow.h" 52#include "llviewerwindow.h"
53#include "llvoavatar.h" 53#include "llvoavatar.h"
54#include "pipeline.h" 54#include "pipeline.h"
55#include "llvieweruictrlfactory.h" 55#include "lluictrlfactory.h"
56#include "llviewerimagelist.h" 56#include "llviewerimagelist.h"
57 57
58//static 58//static
@@ -617,7 +617,7 @@ LLImagePreviewAvatar::LLImagePreviewAvatar(S32 width, S32 height) : LLDynamicTex
617 mDummyAvatar->slamPosition(); 617 mDummyAvatar->slamPosition();
618 mDummyAvatar->updateJointLODs(); 618 mDummyAvatar->updateJointLODs();
619 mDummyAvatar->updateGeometry(mDummyAvatar->mDrawable); 619 mDummyAvatar->updateGeometry(mDummyAvatar->mDrawable);
620 // gPipeline.markVisible(mDummyAvatar->mDrawable, *gCamera); 620 // gPipeline.markVisible(mDummyAvatar->mDrawable, *LLViewerCamera::getInstance());
621 621
622 mTextureName = 0; 622 mTextureName = 0;
623} 623}
@@ -697,16 +697,16 @@ BOOL LLImagePreviewAvatar::render()
697 LLQuaternion(mCameraYaw, LLVector3::z_axis); 697 LLQuaternion(mCameraYaw, LLVector3::z_axis);
698 698
699 LLQuaternion av_rot = avatarp->mPelvisp->getWorldRotation() * camera_rot; 699 LLQuaternion av_rot = avatarp->mPelvisp->getWorldRotation() * camera_rot;
700 gCamera->setOriginAndLookAt( 700 LLViewerCamera::getInstance()->setOriginAndLookAt(
701 target_pos + ((LLVector3(mCameraDistance, 0.f, 0.f) + mCameraOffset) * av_rot), // camera 701 target_pos + ((LLVector3(mCameraDistance, 0.f, 0.f) + mCameraOffset) * av_rot), // camera
702 LLVector3::z_axis, // up 702 LLVector3::z_axis, // up
703 target_pos + (mCameraOffset * av_rot) ); // point of interest 703 target_pos + (mCameraOffset * av_rot) ); // point of interest
704 704
705 stop_glerror(); 705 stop_glerror();
706 706
707 gCamera->setAspect((F32)mWidth / mHeight); 707 LLViewerCamera::getInstance()->setAspect((F32)mWidth / mHeight);
708 gCamera->setView(gCamera->getDefaultFOV() / mCameraZoom); 708 LLViewerCamera::getInstance()->setView(LLViewerCamera::getInstance()->getDefaultFOV() / mCameraZoom);
709 gCamera->setPerspective(FALSE, mOrigin.mX, mOrigin.mY, mWidth, mHeight, FALSE); 709 LLViewerCamera::getInstance()->setPerspective(FALSE, mOrigin.mX, mOrigin.mY, mWidth, mHeight, FALSE);
710 710
711 LLVertexBuffer::stopRender(); 711 LLVertexBuffer::stopRender();
712 avatarp->updateLOD(); 712 avatarp->updateLOD();
@@ -788,7 +788,7 @@ LLImagePreviewSculpted::LLImagePreviewSculpted(S32 width, S32 height) : LLDynami
788 mDummyAvatar->slamPosition(); 788 mDummyAvatar->slamPosition();
789 mDummyAvatar->updateJointLODs(); 789 mDummyAvatar->updateJointLODs();
790 mDummyAvatar->updateGeometry(mDummyAvatar->mDrawable); 790 mDummyAvatar->updateGeometry(mDummyAvatar->mDrawable);
791 gPipeline.markVisible(mDummyAvatar->mDrawable, *gCamera); 791 gPipeline.markVisible(mDummyAvatar->mDrawable, *LLViewerCamera::getInstance());
792 mTextureName = 0; 792 mTextureName = 0;
793 */ 793 */
794} 794}
@@ -857,16 +857,16 @@ BOOL LLImagePreviewSculpted::render()
857 LLQuaternion(mCameraYaw, LLVector3::z_axis); 857 LLQuaternion(mCameraYaw, LLVector3::z_axis);
858 858
859 LLQuaternion av_rot = camera_rot; 859 LLQuaternion av_rot = camera_rot;
860 gCamera->setOriginAndLookAt( 860 LLViewerCamera::getInstance()->setOriginAndLookAt(
861 target_pos + ((LLVector3(mCameraDistance, 0.f, 0.f) + mCameraOffset) * av_rot), // camera 861 target_pos + ((LLVector3(mCameraDistance, 0.f, 0.f) + mCameraOffset) * av_rot), // camera
862 LLVector3::z_axis, // up 862 LLVector3::z_axis, // up
863 target_pos + (mCameraOffset * av_rot) ); // point of interest 863 target_pos + (mCameraOffset * av_rot) ); // point of interest
864 864
865 stop_glerror(); 865 stop_glerror();
866 866
867 gCamera->setAspect((F32) mWidth / mHeight); 867 LLViewerCamera::getInstance()->setAspect((F32) mWidth / mHeight);
868 gCamera->setView(gCamera->getDefaultFOV() / mCameraZoom); 868 LLViewerCamera::getInstance()->setView(LLViewerCamera::getInstance()->getDefaultFOV() / mCameraZoom);
869 gCamera->setPerspective(FALSE, mOrigin.mX, mOrigin.mY, mWidth, mHeight, FALSE); 869 LLViewerCamera::getInstance()->setPerspective(FALSE, mOrigin.mX, mOrigin.mY, mWidth, mHeight, FALSE);
870 870
871 gPipeline.enableLightsAvatar(); 871 gPipeline.enableLightsAvatar();
872 872
@@ -907,7 +907,7 @@ BOOL LLImagePreviewSculpted::render()
907 gGL.color3f(0.4f, 0.4f, 0.4f); 907 gGL.color3f(0.4f, 0.4f, 0.4f);
908 glVertexPointer(3, GL_FLOAT, 0, (void *)vertices); 908 glVertexPointer(3, GL_FLOAT, 0, (void *)vertices);
909 glNormalPointer(GL_FLOAT, 0, (void *)normals); 909 glNormalPointer(GL_FLOAT, 0, (void *)normals);
910 glDrawRangeElements(GL_TRIANGLES, 0, num_indices-1, num_indices, GL_UNSIGNED_SHORT, (void *)indices); 910 glDrawRangeElements(GL_TRIANGLES, 0, num_vertices-1, num_indices, GL_UNSIGNED_SHORT, (void *)indices);
911 911
912 gGL.popMatrix(); 912 gGL.popMatrix();
913 glDisableClientState(GL_NORMAL_ARRAY); 913 glDisableClientState(GL_NORMAL_ARRAY);