Skip to content
Snippets Groups Projects
Commit 6b4e3b0a authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Post-Merge Fixes

Fix lldynamictexture using wrong fbo
Bump Bake fbo to 1024x1024
Build fixes to the new LLModelPreview
parent 550eb03e
No related branches found
No related tags found
No related merge requests found
...@@ -126,10 +126,10 @@ BOOL LLViewerDynamicTexture::render() ...@@ -126,10 +126,10 @@ BOOL LLViewerDynamicTexture::render()
void LLViewerDynamicTexture::preRender(BOOL clear_depth) void LLViewerDynamicTexture::preRender(BOOL clear_depth)
{ {
gPipeline.allocatePhysicsBuffer(); gPipeline.allocatePhysicsBuffer();
llassert(mFullWidth <= static_cast<S32>(gPipeline.mPhysicsDisplay.getWidth())); llassert(mFullWidth <= static_cast<S32>(gPipeline.mBake.getWidth()));
llassert(mFullHeight <= static_cast<S32>(gPipeline.mPhysicsDisplay.getHeight())); 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 { //using offscreen render target, just use the bottom left corner
mOrigin.set(0, 0); mOrigin.set(0, 0);
} }
...@@ -216,7 +216,7 @@ BOOL LLViewerDynamicTexture::updateAllInstances() ...@@ -216,7 +216,7 @@ BOOL LLViewerDynamicTexture::updateAllInstances()
return TRUE; return TRUE;
} }
bool use_fbo = gGLManager.mHasFramebufferObject && gPipeline.mBake.isComplete() && !gGLManager.mIsATI; bool use_fbo = gGLManager.mHasFramebufferObject && gPipeline.mBake.isComplete();
if (use_fbo) if (use_fbo)
{ {
......
...@@ -3034,11 +3034,11 @@ BOOL LLModelPreview::render() ...@@ -3034,11 +3034,11 @@ BOOL LLModelPreview::render()
gGL.diffuseColor4fv(PREVIEW_EDGE_COL.mV); gGL.diffuseColor4fv(PREVIEW_EDGE_COL.mV);
if (edges) if (edges)
{ {
glLineWidth(PREVIEW_EDGE_WIDTH); gGL.setLineWidth(PREVIEW_EDGE_WIDTH);
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getNumVerts() - 1, buffer->getNumIndices(), 0); buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getNumVerts() - 1, buffer->getNumIndices(), 0);
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
glLineWidth(1.f); gGL.setLineWidth(1.f);
} }
} }
gGL.popMatrix(); gGL.popMatrix();
...@@ -3151,12 +3151,12 @@ BOOL LLModelPreview::render() ...@@ -3151,12 +3151,12 @@ BOOL LLModelPreview::render()
buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getNumVerts() - 1, buffer->getNumIndices(), 0); buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getNumVerts() - 1, buffer->getNumIndices(), 0);
gGL.diffuseColor4fv(PREVIEW_PSYH_EDGE_COL.mV); 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); glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getNumVerts() - 1, buffer->getNumIndices(), 0); buffer->drawRange(LLRender::TRIANGLES, 0, buffer->getNumVerts() - 1, buffer->getNumIndices(), 0);
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
glLineWidth(1.f); gGL.setLineWidth(1.f);
} }
} }
} }
...@@ -3166,7 +3166,7 @@ BOOL LLModelPreview::render() ...@@ -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] // only do this if mDegenerate was set in the preceding mesh checks [Check this if the ordering ever breaks]
if (mHasDegenerate) if (mHasDegenerate)
{ {
glLineWidth(PREVIEW_DEG_EDGE_WIDTH); gGL.setLineWidth(PREVIEW_DEG_EDGE_WIDTH);
glPointSize(PREVIEW_DEG_POINT_SIZE); glPointSize(PREVIEW_DEG_POINT_SIZE);
gPipeline.enableLightsFullbright(); gPipeline.enableLightsFullbright();
//show degenerate triangles //show degenerate triangles
...@@ -3238,7 +3238,7 @@ BOOL LLModelPreview::render() ...@@ -3238,7 +3238,7 @@ BOOL LLModelPreview::render()
gGL.popMatrix(); gGL.popMatrix();
} }
glLineWidth(1.f); gGL.setLineWidth(1.f);
glPointSize(1.f); glPointSize(1.f);
gPipeline.enableLightsPreview(); gPipeline.enableLightsPreview();
gGL.setSceneBlendType(LLRender::BT_ALPHA); gGL.setSceneBlendType(LLRender::BT_ALPHA);
...@@ -3334,7 +3334,7 @@ BOOL LLModelPreview::render() ...@@ -3334,7 +3334,7 @@ BOOL LLModelPreview::render()
//build matrix palette //build matrix palette
LLMatrix4a mat[LL_MAX_JOINTS_PER_MESH_OBJECT]; LLMatrix4a mat[LL_MAX_JOINTS_PER_MESH_OBJECT];
LLSkinningUtil::initSkinningMatrixPalette((LLMatrix4*)mat, joint_count, LLSkinningUtil::initSkinningMatrixPalette(mat, joint_count,
skin, getPreviewAvatar()); skin, getPreviewAvatar());
LLMatrix4a bind_shape_matrix; LLMatrix4a bind_shape_matrix;
...@@ -3380,11 +3380,11 @@ BOOL LLModelPreview::render() ...@@ -3380,11 +3380,11 @@ BOOL LLModelPreview::render()
if (edges) if (edges)
{ {
gGL.diffuseColor4fv(PREVIEW_EDGE_COL.mV); gGL.diffuseColor4fv(PREVIEW_EDGE_COL.mV);
glLineWidth(PREVIEW_EDGE_WIDTH); gGL.setLineWidth(PREVIEW_EDGE_WIDTH);
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
buffer->draw(LLRender::TRIANGLES, buffer->getNumIndices(), 0); buffer->draw(LLRender::TRIANGLES, buffer->getNumIndices(), 0);
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
glLineWidth(1.f); gGL.setLineWidth(1.f);
} }
} }
} }
......
...@@ -1287,7 +1287,7 @@ void LLPipeline::createGLBuffers() ...@@ -1287,7 +1287,7 @@ void LLPipeline::createGLBuffers()
} }
// Use FBO for bake tex // 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); mHighlight.allocate(256,256,GL_RGBA, FALSE, FALSE);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment