diff options
author | Jacek Antonelli | 2009-04-30 13:04:20 -0500 |
---|---|---|
committer | Jacek Antonelli | 2009-04-30 13:07:16 -0500 |
commit | ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e (patch) | |
tree | 8348301d0ac44a524f1819b777686bf086907d76 /linden/indra/newview/llfloaterimagepreview.cpp | |
parent | Second Life viewer sources 1.22.11 (diff) | |
download | meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.zip meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.gz meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.bz2 meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.xz |
Second Life viewer sources 1.23.0-RC
Diffstat (limited to 'linden/indra/newview/llfloaterimagepreview.cpp')
-rw-r--r-- | linden/indra/newview/llfloaterimagepreview.cpp | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/linden/indra/newview/llfloaterimagepreview.cpp b/linden/indra/newview/llfloaterimagepreview.cpp index 4a8c66e..d2038de 100644 --- a/linden/indra/newview/llfloaterimagepreview.cpp +++ b/linden/indra/newview/llfloaterimagepreview.cpp | |||
@@ -17,7 +17,8 @@ | |||
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception | 20 | * online at |
21 | * http://secondlifegrid.net/programs/open_source/licensing/flossexception | ||
21 | * | 22 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 23 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 24 | * that you have read and understood your obligations described above, |
@@ -134,6 +135,8 @@ BOOL LLFloaterImagePreview::postBuild() | |||
134 | //----------------------------------------------------------------------------- | 135 | //----------------------------------------------------------------------------- |
135 | LLFloaterImagePreview::~LLFloaterImagePreview() | 136 | LLFloaterImagePreview::~LLFloaterImagePreview() |
136 | { | 137 | { |
138 | clearAllPreviewTextures(); | ||
139 | |||
137 | mRawImagep = NULL; | 140 | mRawImagep = NULL; |
138 | delete mAvatarPreview; | 141 | delete mAvatarPreview; |
139 | delete mSculptedPreview; | 142 | delete mSculptedPreview; |
@@ -201,6 +204,21 @@ void LLFloaterImagePreview::onPreviewTypeCommit(LLUICtrl* ctrl, void* userdata) | |||
201 | fp->mSculptedPreview->refresh(); | 204 | fp->mSculptedPreview->refresh(); |
202 | } | 205 | } |
203 | 206 | ||
207 | |||
208 | //----------------------------------------------------------------------------- | ||
209 | // clearAllPreviewTextures() | ||
210 | //----------------------------------------------------------------------------- | ||
211 | void LLFloaterImagePreview::clearAllPreviewTextures() | ||
212 | { | ||
213 | mAvatarPreview->clearPreviewTexture("mHairMesh0"); | ||
214 | mAvatarPreview->clearPreviewTexture("mUpperBodyMesh0"); | ||
215 | mAvatarPreview->clearPreviewTexture("mLowerBodyMesh0"); | ||
216 | mAvatarPreview->clearPreviewTexture("mHeadMesh0"); | ||
217 | mAvatarPreview->clearPreviewTexture("mUpperBodyMesh0"); | ||
218 | mAvatarPreview->clearPreviewTexture("mLowerBodyMesh0"); | ||
219 | mAvatarPreview->clearPreviewTexture("mSkirtMesh0"); | ||
220 | } | ||
221 | |||
204 | //----------------------------------------------------------------------------- | 222 | //----------------------------------------------------------------------------- |
205 | // draw() | 223 | // draw() |
206 | //----------------------------------------------------------------------------- | 224 | //----------------------------------------------------------------------------- |
@@ -233,8 +251,7 @@ void LLFloaterImagePreview::draw() | |||
233 | gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mImagep->getTexName()); | 251 | gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mImagep->getTexName()); |
234 | stop_glerror(); | 252 | stop_glerror(); |
235 | 253 | ||
236 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); | 254 | gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR); |
237 | glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); | ||
238 | 255 | ||
239 | gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP); | 256 | gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP); |
240 | if (mAvatarPreview) | 257 | if (mAvatarPreview) |
@@ -646,6 +663,19 @@ void LLImagePreviewAvatar::setPreviewTarget(const std::string& joint_name, const | |||
646 | } | 663 | } |
647 | 664 | ||
648 | //----------------------------------------------------------------------------- | 665 | //----------------------------------------------------------------------------- |
666 | // clearPreviewTexture() | ||
667 | //----------------------------------------------------------------------------- | ||
668 | void LLImagePreviewAvatar::clearPreviewTexture(const std::string& mesh_name) | ||
669 | { | ||
670 | LLViewerJointMesh *mesh = (LLViewerJointMesh*)mDummyAvatar->mRoot.findJoint(mesh_name); | ||
671 | // clear out existing test mesh | ||
672 | if (mesh) | ||
673 | { | ||
674 | mesh->setTestTexture(0); | ||
675 | } | ||
676 | } | ||
677 | |||
678 | //----------------------------------------------------------------------------- | ||
649 | // update() | 679 | // update() |
650 | //----------------------------------------------------------------------------- | 680 | //----------------------------------------------------------------------------- |
651 | BOOL LLImagePreviewAvatar::render() | 681 | BOOL LLImagePreviewAvatar::render() |