diff options
Diffstat (limited to 'linden/indra/newview/llfloaterimagepreview.cpp')
-rw-r--r-- | linden/indra/newview/llfloaterimagepreview.cpp | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/linden/indra/newview/llfloaterimagepreview.cpp b/linden/indra/newview/llfloaterimagepreview.cpp index f1f7ff6..a228587 100644 --- a/linden/indra/newview/llfloaterimagepreview.cpp +++ b/linden/indra/newview/llfloaterimagepreview.cpp | |||
@@ -260,7 +260,7 @@ void LLFloaterImagePreview::draw() | |||
260 | } | 260 | } |
261 | 261 | ||
262 | gGL.color3f(1.f, 1.f, 1.f); | 262 | gGL.color3f(1.f, 1.f, 1.f); |
263 | gGL.begin( GL_QUADS ); | 263 | gGL.begin( LLVertexBuffer::QUADS ); |
264 | { | 264 | { |
265 | gGL.texCoord2f(mPreviewImageRect.mLeft, mPreviewImageRect.mTop); | 265 | gGL.texCoord2f(mPreviewImageRect.mLeft, mPreviewImageRect.mTop); |
266 | gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT); | 266 | gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT); |
@@ -288,7 +288,7 @@ void LLFloaterImagePreview::draw() | |||
288 | else | 288 | else |
289 | mAvatarPreview->bindTexture(); | 289 | mAvatarPreview->bindTexture(); |
290 | 290 | ||
291 | gGL.begin( GL_QUADS ); | 291 | gGL.begin( LLVertexBuffer::QUADS ); |
292 | { | 292 | { |
293 | gGL.texCoord2f(0.f, 1.f); | 293 | gGL.texCoord2f(0.f, 1.f); |
294 | gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT); | 294 | gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT); |
@@ -667,8 +667,6 @@ void LLImagePreviewAvatar::setPreviewTarget(const char* joint_name, const char* | |||
667 | //----------------------------------------------------------------------------- | 667 | //----------------------------------------------------------------------------- |
668 | BOOL LLImagePreviewAvatar::render() | 668 | BOOL LLImagePreviewAvatar::render() |
669 | { | 669 | { |
670 | gGL.start(); | ||
671 | |||
672 | mNeedsUpdate = FALSE; | 670 | mNeedsUpdate = FALSE; |
673 | LLVOAvatar* avatarp = mDummyAvatar; | 671 | LLVOAvatar* avatarp = mDummyAvatar; |
674 | 672 | ||
@@ -692,7 +690,7 @@ BOOL LLImagePreviewAvatar::render() | |||
692 | glMatrixMode(GL_MODELVIEW); | 690 | glMatrixMode(GL_MODELVIEW); |
693 | gGL.popMatrix(); | 691 | gGL.popMatrix(); |
694 | 692 | ||
695 | gGL.stop(); | 693 | gGL.flush(); |
696 | LLVector3 target_pos = mTargetJoint->getWorldPosition(); | 694 | LLVector3 target_pos = mTargetJoint->getWorldPosition(); |
697 | 695 | ||
698 | LLQuaternion camera_rot = LLQuaternion(mCameraPitch, LLVector3::y_axis) * | 696 | LLQuaternion camera_rot = LLQuaternion(mCameraPitch, LLVector3::y_axis) * |
@@ -710,9 +708,9 @@ BOOL LLImagePreviewAvatar::render() | |||
710 | LLViewerCamera::getInstance()->setView(LLViewerCamera::getInstance()->getDefaultFOV() / mCameraZoom); | 708 | LLViewerCamera::getInstance()->setView(LLViewerCamera::getInstance()->getDefaultFOV() / mCameraZoom); |
711 | LLViewerCamera::getInstance()->setPerspective(FALSE, mOrigin.mX, mOrigin.mY, mWidth, mHeight, FALSE); | 709 | LLViewerCamera::getInstance()->setPerspective(FALSE, mOrigin.mX, mOrigin.mY, mWidth, mHeight, FALSE); |
712 | 710 | ||
713 | LLVertexBuffer::stopRender(); | 711 | LLVertexBuffer::unbind(); |
714 | avatarp->updateLOD(); | 712 | avatarp->updateLOD(); |
715 | LLVertexBuffer::startRender(); | 713 | |
716 | 714 | ||
717 | if (avatarp->mDrawable.notNull()) | 715 | if (avatarp->mDrawable.notNull()) |
718 | { | 716 | { |
@@ -725,6 +723,7 @@ BOOL LLImagePreviewAvatar::render() | |||
725 | avatarPoolp->renderAvatars(avatarp); // renders only one avatar | 723 | avatarPoolp->renderAvatars(avatarp); // renders only one avatar |
726 | } | 724 | } |
727 | 725 | ||
726 | gGL.color4f(1,1,1,1); | ||
728 | return TRUE; | 727 | return TRUE; |
729 | } | 728 | } |
730 | 729 | ||
@@ -823,8 +822,6 @@ void LLImagePreviewSculpted::setPreviewTarget(LLImageRaw* imagep, F32 distance) | |||
823 | //----------------------------------------------------------------------------- | 822 | //----------------------------------------------------------------------------- |
824 | BOOL LLImagePreviewSculpted::render() | 823 | BOOL LLImagePreviewSculpted::render() |
825 | { | 824 | { |
826 | gGL.start(); | ||
827 | |||
828 | mNeedsUpdate = FALSE; | 825 | mNeedsUpdate = FALSE; |
829 | 826 | ||
830 | LLGLSUIDefault def; | 827 | LLGLSUIDefault def; |
@@ -919,8 +916,6 @@ BOOL LLImagePreviewSculpted::render() | |||
919 | delete [] normals; | 916 | delete [] normals; |
920 | } | 917 | } |
921 | 918 | ||
922 | gGL.stop(); | ||
923 | |||
924 | return TRUE; | 919 | return TRUE; |
925 | } | 920 | } |
926 | 921 | ||