Merge branch 'master' of https://github.com/singularity-viewer/SingularityViewer
This commit is contained in:
@@ -8,10 +8,10 @@ include(DBusGlib)
|
||||
include(DirectX)
|
||||
include(ELFIO)
|
||||
if(FMODEX)
|
||||
include(FMODEX)
|
||||
set(FMOD OFF)
|
||||
include(FMODEX)
|
||||
set(FMOD OFF)
|
||||
else(FMODEX)
|
||||
include(FMOD)
|
||||
include(FMOD)
|
||||
endif(FMODEX)
|
||||
include(OPENAL)
|
||||
include(FindOpenGL)
|
||||
@@ -1560,10 +1560,10 @@ target_link_libraries(${VIEWER_BINARY_NAME}
|
||||
${LLCOMMON_LIBRARIES}
|
||||
${NDOF_LIBRARY}
|
||||
${viewer_LIBRARIES}
|
||||
${BOOST_FILESYSTEM_LIBRARY}
|
||||
${BOOST_PROGRAM_OPTIONS_LIBRARY}
|
||||
${BOOST_REGEX_LIBRARY}
|
||||
${BOOST_SYSTEM_LIBRARY}
|
||||
${Boost_FILESYSTEM_LIBRARY}
|
||||
${Boost_PROGRAM_OPTIONS_LIBRARY}
|
||||
${Boost_REGEX_LIBRARY}
|
||||
${Boost_SYSTEM_LIBRARY}
|
||||
${DBUSGLIB_LIBRARIES}
|
||||
${OPENGL_LIBRARIES}
|
||||
${FMODWRAPPER_LIBRARY} # must come after LLAudio
|
||||
|
||||
@@ -1598,16 +1598,18 @@ void LLDrawPoolInvisible::renderDeferred( S32 pass )
|
||||
}
|
||||
|
||||
LLFastTimer t(FTM_RENDER_INVISIBLE);
|
||||
|
||||
|
||||
gOcclusionProgram.bind();
|
||||
|
||||
U32 invisi_mask = LLVertexBuffer::MAP_VERTEX;
|
||||
glStencilMask(0);
|
||||
glStencilOp(GL_ZERO, GL_KEEP, GL_REPLACE);
|
||||
gGL.setColorMask(false, false);
|
||||
pushBatches(LLRenderPass::PASS_INVISIBLE, invisi_mask, FALSE);
|
||||
gGL.setColorMask(true, true);
|
||||
glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE);
|
||||
glStencilMask(0xFFFFFFFF);
|
||||
|
||||
gOcclusionProgram.unbind();
|
||||
|
||||
if (gPipeline.hasRenderBatches(LLRenderPass::PASS_INVISI_SHINY))
|
||||
{
|
||||
beginShiny(true);
|
||||
|
||||
@@ -5484,6 +5484,8 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud)
|
||||
|
||||
gGL.matrixMode(LLRender::MM_MODELVIEW);
|
||||
gGL.pushMatrix();
|
||||
gGL.pushUIMatrix();
|
||||
gGL.loadUIIdentity();
|
||||
gGL.loadIdentity();
|
||||
gGL.loadMatrix(OGL_TO_CFR_ROTATION); // Load Cory's favorite reference frame
|
||||
gGL.translatef(-hud_bbox.getCenterLocal().mV[VX] + (depth *0.5f), 0.f, 0.f);
|
||||
@@ -5576,6 +5578,7 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud)
|
||||
|
||||
gGL.matrixMode(LLRender::MM_MODELVIEW);
|
||||
gGL.popMatrix();
|
||||
gGL.popUIMatrix();
|
||||
stop_glerror();
|
||||
}
|
||||
|
||||
@@ -5898,8 +5901,8 @@ void pushWireframe(LLDrawable* drawable)
|
||||
|
||||
if (drawable->isState(LLDrawable::RIGGED))
|
||||
{
|
||||
vobj->updateRiggedVolume();
|
||||
volume = vobj->getRiggedVolume();
|
||||
vobj->updateRiggedVolume();
|
||||
volume = vobj->getRiggedVolume();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -5941,6 +5944,8 @@ void LLSelectNode::renderOneWireframe(const LLColor4& color)
|
||||
gDebugProgram.bind();
|
||||
}
|
||||
|
||||
static LLCachedControl<U32> mode("OutlineMode",0);
|
||||
|
||||
gGL.matrixMode(LLRender::MM_MODELVIEW);
|
||||
gGL.pushMatrix();
|
||||
|
||||
@@ -5961,10 +5966,12 @@ void LLSelectNode::renderOneWireframe(const LLColor4& color)
|
||||
|
||||
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
|
||||
|
||||
//Singu Note: Diverges from v3. If sRenderHiddenSelections set, draw non-z-culled wireframe, else draw occluded 'thick' wireframe to create an outline.
|
||||
if (LLSelectMgr::sRenderHiddenSelections) // && gFloaterTools && gFloaterTools->getVisible())
|
||||
{
|
||||
gGL.blendFunc(LLRender::BF_SOURCE_COLOR, LLRender::BF_ONE);
|
||||
LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE, GL_GEQUAL);
|
||||
|
||||
if (shader)
|
||||
{
|
||||
gGL.diffuseColor4f(color.mV[VRED], color.mV[VGREEN], color.mV[VBLUE], 0.4f);
|
||||
@@ -5986,18 +5993,21 @@ void LLSelectNode::renderOneWireframe(const LLColor4& color)
|
||||
pushWireframe(drawable);
|
||||
}
|
||||
}
|
||||
gGL.setSceneBlendType(LLRender::BT_ALPHA);
|
||||
}
|
||||
else
|
||||
{
|
||||
LLGLEnable cull_face(GL_CULL_FACE);
|
||||
LLGLEnable offset(GL_POLYGON_OFFSET_LINE);
|
||||
|
||||
gGL.setSceneBlendType(LLRender::BT_ALPHA);
|
||||
gGL.diffuseColor4f(color.mV[VRED]*2, color.mV[VGREEN]*2, color.mV[VBLUE]*2, LLSelectMgr::sHighlightAlpha*2);
|
||||
glPolygonOffset(3.f, 3.f);
|
||||
glLineWidth(3.f);
|
||||
pushWireframe(drawable);
|
||||
glLineWidth(1.f);
|
||||
}
|
||||
|
||||
gGL.flush();
|
||||
gGL.setSceneBlendType(LLRender::BT_ALPHA);
|
||||
|
||||
gGL.diffuseColor4f(color.mV[VRED]*2, color.mV[VGREEN]*2, color.mV[VBLUE]*2, LLSelectMgr::sHighlightAlpha*2);
|
||||
|
||||
LLGLEnable offset(GL_POLYGON_OFFSET_LINE);
|
||||
glPolygonOffset(3.f, 3.f);
|
||||
glLineWidth(3.f);
|
||||
pushWireframe(drawable);
|
||||
glLineWidth(1.f);
|
||||
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
|
||||
gGL.popMatrix();
|
||||
|
||||
@@ -6053,6 +6063,9 @@ void LLSelectNode::renderOneSilhouette(const LLColor4 &color)
|
||||
|
||||
gGL.matrixMode(LLRender::MM_MODELVIEW);
|
||||
gGL.pushMatrix();
|
||||
gGL.pushUIMatrix();
|
||||
gGL.loadUIIdentity();
|
||||
|
||||
if (!is_hud_object)
|
||||
{
|
||||
gGL.loadIdentity();
|
||||
@@ -6169,6 +6182,7 @@ void LLSelectNode::renderOneSilhouette(const LLColor4 &color)
|
||||
gGL.flush();
|
||||
}
|
||||
gGL.popMatrix();
|
||||
gGL.popUIMatrix();
|
||||
|
||||
if (shader)
|
||||
{
|
||||
|
||||
@@ -576,10 +576,10 @@ void LLViewerShaderMgr::setShaders()
|
||||
|
||||
//Flag base shader objects for deletion
|
||||
//Don't worry-- they won't be deleted until no programs refrence them.
|
||||
std::map<std::string, GLhandleARB>::iterator it = mShaderObjects.begin();
|
||||
std::multimap<std::string, LLShaderMgr::CachedObjectInfo >::iterator it = mShaderObjects.begin();
|
||||
for(; it!=mShaderObjects.end();++it)
|
||||
if(it->second)
|
||||
glDeleteObjectARB(it->second);
|
||||
if(it->second.mHandle)
|
||||
glDeleteObjectARB(it->second.mHandle);
|
||||
mShaderObjects.clear();
|
||||
}
|
||||
else
|
||||
|
||||
@@ -1605,9 +1605,13 @@ S32 LLVOVolume::setTEColor(const U8 te, const LLColor4& color)
|
||||
}
|
||||
else if (color != tep->getColor())
|
||||
{
|
||||
if (color.mV[3] != tep->getColor().mV[3])
|
||||
F32 old_alpha = tep->getColor().mV[3];
|
||||
if ((color.mV[3] != old_alpha) && (color.mV[3] == 1.f || old_alpha == 1.f))
|
||||
{
|
||||
gPipeline.markTextured(mDrawable);
|
||||
//treat this alpha change as an LoD update since render batches may need to get rebuilt
|
||||
mLODChanged = TRUE;
|
||||
gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, FALSE);
|
||||
}
|
||||
retval = LLPrimitive::setTEColor(te, color);
|
||||
if (mDrawable.notNull() && retval)
|
||||
|
||||
Reference in New Issue
Block a user