From 6b4e3b0a72eb162d86dff03743b4cf5d77b4e936 Mon Sep 17 00:00:00 2001 From: Rye Mutt <rye@alchemyviewer.org> Date: Thu, 15 Oct 2020 07:17:04 -0400 Subject: [PATCH] Post-Merge Fixes Fix lldynamictexture using wrong fbo Bump Bake fbo to 1024x1024 Build fixes to the new LLModelPreview --- indra/newview/lldynamictexture.cpp | 8 ++++---- indra/newview/llmodelpreview.cpp | 18 +++++++++--------- indra/newview/pipeline.cpp | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/indra/newview/lldynamictexture.cpp b/indra/newview/lldynamictexture.cpp index ed6f20346cb..69d5dbc7e34 100644 --- a/indra/newview/lldynamictexture.cpp +++ b/indra/newview/lldynamictexture.cpp @@ -126,10 +126,10 @@ BOOL LLViewerDynamicTexture::render() void LLViewerDynamicTexture::preRender(BOOL clear_depth) { gPipeline.allocatePhysicsBuffer(); - llassert(mFullWidth <= static_cast<S32>(gPipeline.mPhysicsDisplay.getWidth())); - llassert(mFullHeight <= static_cast<S32>(gPipeline.mPhysicsDisplay.getHeight())); + llassert(mFullWidth <= static_cast<S32>(gPipeline.mBake.getWidth())); + llassert(mFullHeight <= static_cast<S32>(gPipeline.mBake.getHeight())); - if (gGLManager.mHasFramebufferObject && gPipeline.mPhysicsDisplay.isComplete() && !gGLManager.mIsATI) + if (gGLManager.mHasFramebufferObject && gPipeline.mBake.isComplete()) { //using offscreen render target, just use the bottom left corner mOrigin.set(0, 0); } @@ -216,7 +216,7 @@ BOOL LLViewerDynamicTexture::updateAllInstances() return TRUE; } - bool use_fbo = gGLManager.mHasFramebufferObject && gPipeline.mBake.isComplete() && !gGLManager.mIsATI; + bool use_fbo = gGLManager.mHasFramebufferObject && gPipeline.mBake.isComplete(); if (use_fbo) { diff --git a/indra/newview/llmodelpreview.cpp b/indra/newview/llmodelpreview.cpp index d60d1d748ef..a5693022846 100644 --- a/indra/newview/llmodelpreview.cpp +++ b/indra/newview/llmodelpreview.cpp @@ -3034,11 +3034,11 @@ BOOL LLModelPreview::render() gGL.diffuseColor4fv(PREVIEW_EDGE_COL.mV); if (edges) { - glLineWidth(PREVIEW_EDGE_WIDTH); + gGL.setLineWidth(PREVIEW_EDGE_WIDTH); glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getNumVerts() - 1, buffer->getNumIndices(), 0); glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - glLineWidth(1.f); + gGL.setLineWidth(1.f); } } gGL.popMatrix(); @@ -3151,12 +3151,12 @@ BOOL LLModelPreview::render() buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getNumVerts() - 1, buffer->getNumIndices(), 0); gGL.diffuseColor4fv(PREVIEW_PSYH_EDGE_COL.mV); - glLineWidth(PREVIEW_PSYH_EDGE_WIDTH); + gGL.setLineWidth(PREVIEW_PSYH_EDGE_WIDTH); glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getNumVerts() - 1, buffer->getNumIndices(), 0); glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - glLineWidth(1.f); + gGL.setLineWidth(1.f); } } } @@ -3166,7 +3166,7 @@ BOOL LLModelPreview::render() // only do this if mDegenerate was set in the preceding mesh checks [Check this if the ordering ever breaks] if (mHasDegenerate) { - glLineWidth(PREVIEW_DEG_EDGE_WIDTH); + gGL.setLineWidth(PREVIEW_DEG_EDGE_WIDTH); glPointSize(PREVIEW_DEG_POINT_SIZE); gPipeline.enableLightsFullbright(); //show degenerate triangles @@ -3238,7 +3238,7 @@ BOOL LLModelPreview::render() gGL.popMatrix(); } - glLineWidth(1.f); + gGL.setLineWidth(1.f); glPointSize(1.f); gPipeline.enableLightsPreview(); gGL.setSceneBlendType(LLRender::BT_ALPHA); @@ -3334,7 +3334,7 @@ BOOL LLModelPreview::render() //build matrix palette LLMatrix4a mat[LL_MAX_JOINTS_PER_MESH_OBJECT]; - LLSkinningUtil::initSkinningMatrixPalette((LLMatrix4*)mat, joint_count, + LLSkinningUtil::initSkinningMatrixPalette(mat, joint_count, skin, getPreviewAvatar()); LLMatrix4a bind_shape_matrix; @@ -3380,11 +3380,11 @@ BOOL LLModelPreview::render() if (edges) { gGL.diffuseColor4fv(PREVIEW_EDGE_COL.mV); - glLineWidth(PREVIEW_EDGE_WIDTH); + gGL.setLineWidth(PREVIEW_EDGE_WIDTH); glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); buffer->draw(LLRender::TRIANGLES, buffer->getNumIndices(), 0); glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - glLineWidth(1.f); + gGL.setLineWidth(1.f); } } } diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index e9841138bd8..cd28a6703fd 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -1287,7 +1287,7 @@ void LLPipeline::createGLBuffers() } // Use FBO for bake tex - mBake.allocate(512, 512, GL_RGBA, TRUE, FALSE, LLTexUnit::TT_TEXTURE, true); // SL-12781 Build > Upload > Model; 3D Preview + mBake.allocate(1024, 1024, GL_RGBA, TRUE, FALSE, LLTexUnit::TT_TEXTURE, true); // SL-12781 Build > Upload > Model; 3D Preview mHighlight.allocate(256,256,GL_RGBA, FALSE, FALSE); -- GitLab