Merge branch 'master' of https://github.com/singularity-viewer/SingularityViewer
This commit is contained in:
@@ -7,10 +7,8 @@ set(Boost_FIND_REQUIRED ON)
|
||||
if (STANDALONE)
|
||||
include(FindBoost)
|
||||
|
||||
set(BOOST_FILESYSTEM_LIBRARY boost_filesystem-mt)
|
||||
set(BOOST_PROGRAM_OPTIONS_LIBRARY boost_program_options-mt)
|
||||
set(BOOST_REGEX_LIBRARY boost_regex-mt)
|
||||
set(BOOST_SYSTEM_LIBRARY boost_system-mt)
|
||||
set(Boost_USE_MULTITHREADED ON)
|
||||
find_package(Boost 1.40.0 COMPONENTS date_time filesystem program_options regex system thread wave)
|
||||
else (STANDALONE)
|
||||
use_prebuilt_binary(boost)
|
||||
set(Boost_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/include)
|
||||
@@ -18,36 +16,36 @@ else (STANDALONE)
|
||||
if (WINDOWS)
|
||||
set(BOOST_VERSION 1_45)
|
||||
|
||||
# SNOW-788
|
||||
# 00-Common.cmake alreay sets MSVC_SUFFIX to be correct for the VS we are using eg VC71, VC80, VC90 etc
|
||||
# The precompiled boost libs for VC71 use a different suffix to VS80 and VS90
|
||||
# This code should ensure the cmake rules are valid for any VS being used in future as long as the approprate
|
||||
# boost libs are avaiable - RC.
|
||||
|
||||
if (MSVC71)
|
||||
set(BOOST_OPTIM_SUFFIX mt-s)
|
||||
set(BOOST_DEBUG_SUFFIX mt-sgd)
|
||||
else (MSVC71)
|
||||
set(BOOST_OPTIM_SUFFIX mt)
|
||||
set(BOOST_DEBUG_SUFFIX mt-gd)
|
||||
endif (MSVC71)
|
||||
|
||||
set(BOOST_PROGRAM_OPTIONS_LIBRARY
|
||||
# SNOW-788
|
||||
# 00-Common.cmake alreay sets MSVC_SUFFIX to be correct for the VS we are using eg VC71, VC80, VC90 etc
|
||||
# The precompiled boost libs for VC71 use a different suffix to VS80 and VS90
|
||||
# This code should ensure the cmake rules are valid for any VS being used in future as long as the approprate
|
||||
# boost libs are avaiable - RC.
|
||||
|
||||
if (MSVC71)
|
||||
set(BOOST_OPTIM_SUFFIX mt-s)
|
||||
set(BOOST_DEBUG_SUFFIX mt-sgd)
|
||||
else (MSVC71)
|
||||
set(BOOST_OPTIM_SUFFIX mt)
|
||||
set(BOOST_DEBUG_SUFFIX mt-gd)
|
||||
endif (MSVC71)
|
||||
|
||||
set(Boost_PROGRAM_OPTIONS_LIBRARY
|
||||
optimized libboost_program_options-vc${MSVC_SUFFIX}-${BOOST_OPTIM_SUFFIX}-${BOOST_VERSION}
|
||||
debug libboost_program_options-vc${MSVC_SUFFIX}-${BOOST_DEBUG_SUFFIX}-${BOOST_VERSION})
|
||||
set(BOOST_REGEX_LIBRARY
|
||||
set(Boost_REGEX_LIBRARY
|
||||
optimized libboost_regex-vc${MSVC_SUFFIX}-${BOOST_OPTIM_SUFFIX}-${BOOST_VERSION}
|
||||
debug libboost_regex-vc${MSVC_SUFFIX}-${BOOST_DEBUG_SUFFIX}-${BOOST_VERSION})
|
||||
|
||||
|
||||
elseif (DARWIN)
|
||||
set(BOOST_FILESYSTEM_LIBRARY boost_filesystem)
|
||||
set(BOOST_PROGRAM_OPTIONS_LIBRARY boost_program_options)
|
||||
set(BOOST_REGEX_LIBRARY boost_regex)
|
||||
set(BOOST_SYSTEM_LIBRARY boost_system)
|
||||
set(Boost_FILESYSTEM_LIBRARY boost_filesystem)
|
||||
set(Boost_PROGRAM_OPTIONS_LIBRARY boost_program_options)
|
||||
set(Boost_REGEX_LIBRARY boost_regex)
|
||||
set(Boost_SYSTEM_LIBRARY boost_system)
|
||||
elseif (LINUX)
|
||||
set(BOOST_FILESYSTEM_LIBRARY boost_filesystem-mt)
|
||||
set(BOOST_PROGRAM_OPTIONS_LIBRARY boost_program_options-mt)
|
||||
set(BOOST_REGEX_LIBRARY boost_regex-mt)
|
||||
set(BOOST_SYSTEM_LIBRARY boost_system-mt)
|
||||
set(Boost_FILESYSTEM_LIBRARY boost_filesystem-mt)
|
||||
set(Boost_PROGRAM_OPTIONS_LIBRARY boost_program_options-mt)
|
||||
set(Boost_REGEX_LIBRARY boost_regex-mt)
|
||||
set(Boost_SYSTEM_LIBRARY boost_system-mt)
|
||||
endif (WINDOWS)
|
||||
endif (STANDALONE)
|
||||
|
||||
@@ -8,7 +8,7 @@ if(INSTALL_PROPRIETARY)
|
||||
endif(INSTALL_PROPRIETARY)
|
||||
|
||||
find_library(FMODEX_LIBRARY
|
||||
NAMES fmodex fmodex_vc fmodexL_vc
|
||||
NAMES fmodex fmodexL fmodex_vc fmodexL_vc
|
||||
PATHS
|
||||
optimized ${ARCH_PREBUILT_DIRS_RELEASE}
|
||||
debug ${ARCH_PREBUILT_DIRS_DEBUG}
|
||||
@@ -26,26 +26,25 @@ if (NOT FMODEX_LIBRARY)
|
||||
${FMODEX_SDK_DIR}
|
||||
)
|
||||
|
||||
|
||||
endif(FMODEX_SDK_DIR)
|
||||
if(WINDOWS AND NOT FMODEX_LIBRARY)
|
||||
set(FMODEX_PROG_DIR "$ENV{PROGRAMFILES}/FMOD SoundSystem/FMOD Programmers API Windows")
|
||||
find_library(FMODEX_LIBRARY
|
||||
fmodex_vc fmodexL_vc
|
||||
set(FMODEX_PROG_DIR "$ENV{PROGRAMFILES}/FMOD SoundSystem/FMOD Programmers API Windows")
|
||||
find_library(FMODEX_LIBRARY
|
||||
fmodex_vc fmodexL_vc
|
||||
PATHS
|
||||
${FMODEX_PROG_DIR}/api/lib
|
||||
${FMODEX_PROG_DIR}/api
|
||||
${FMODEX_PROG_DIR}
|
||||
${FMODEX_PROG_DIR}/api
|
||||
${FMODEX_PROG_DIR}
|
||||
)
|
||||
if(FMODEX_LIBRARY)
|
||||
message(STATUS "Found fmodex in ${FMODEX_PROG_DIR}")
|
||||
set(FMODEX_SDK_DIR ${FMODEX_PROG_DIR})
|
||||
set(FMODEX_SDK_DIR ${FMODEX_PROG_DIR} CACHE PATH "Path to the FMOD Ex SDK." FORCE)
|
||||
endif(FMODEX_LIBRARY)
|
||||
if(FMODEX_LIBRARY)
|
||||
message(STATUS "Found fmodex in ${FMODEX_PROG_DIR}")
|
||||
set(FMODEX_SDK_DIR ${FMODEX_PROG_DIR})
|
||||
set(FMODEX_SDK_DIR ${FMODEX_PROG_DIR} CACHE PATH "Path to the FMOD Ex SDK." FORCE)
|
||||
endif(FMODEX_LIBRARY)
|
||||
endif(WINDOWS AND NOT FMODEX_LIBRARY)
|
||||
endif (NOT FMODEX_LIBRARY)
|
||||
|
||||
find_path(FMODEX_INCLUDE_DIR fmod.h
|
||||
find_path(FMODEX_INCLUDE_DIR fmod.hpp
|
||||
${LIBS_PREBUILT_DIR}/include/fmodex
|
||||
${LIBS_PREBUILT_DIR}/${LL_ARCH_DIR}/fmodex
|
||||
${FMODEX_SDK_DIR}/api/inc
|
||||
|
||||
@@ -5,7 +5,7 @@ FIND_PATH(HUNSPELL_INCLUDE_DIR hunspell.hxx
|
||||
/usr/include
|
||||
)
|
||||
|
||||
SET(HUNSPELL_NAMES ${HUNSPELL_NAMES} hunspell hunspell-1.2)
|
||||
SET(HUNSPELL_NAMES ${HUNSPELL_NAMES} hunspell hunspell-1.2 hunspell-1.3)
|
||||
FIND_LIBRARY(HUNSPELL_LIBRARY
|
||||
NAMES ${HUNSPELL_NAMES}
|
||||
PATHS /usr/lib /usr/local/lib
|
||||
|
||||
@@ -8,5 +8,5 @@ set(LLVFS_INCLUDE_DIRS
|
||||
|
||||
set(LLVFS_LIBRARIES
|
||||
llvfs
|
||||
${BOOST_REGEX_LIBRARY}
|
||||
${Boost_REGEX_LIBRARY}
|
||||
)
|
||||
|
||||
@@ -265,7 +265,7 @@ target_link_libraries(
|
||||
${EXPAT_LIBRARIES}
|
||||
${ZLIB_LIBRARIES}
|
||||
${WINDOWS_LIBRARIES}
|
||||
${BOOST_REGEX_LIBRARY}
|
||||
${Boost_REGEX_LIBRARY}
|
||||
${CWDEBUG_LIBRARIES}
|
||||
${CORESERVICES_LIBRARY}
|
||||
)
|
||||
|
||||
@@ -244,14 +244,16 @@ BOOL LLGLSLShader::createShader(vector<string> * attributes,
|
||||
|
||||
BOOL LLGLSLShader::attachObject(std::string object)
|
||||
{
|
||||
if (LLShaderMgr::instance()->mShaderObjects.count(object) > 0)
|
||||
std::multimap<std::string, LLShaderMgr::CachedObjectInfo>::iterator it = LLShaderMgr::instance()->mShaderObjects.begin();
|
||||
for(; it!=LLShaderMgr::instance()->mShaderObjects.end(); it++)
|
||||
{
|
||||
stop_glerror();
|
||||
glAttachObjectARB(mProgramObject, LLShaderMgr::instance()->mShaderObjects[object]);
|
||||
stop_glerror();
|
||||
return TRUE;
|
||||
if((*it).first == object)
|
||||
{
|
||||
glAttachObjectARB(mProgramObject, (*it).second.mHandle);
|
||||
stop_glerror();
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
LL_WARNS("ShaderLoading") << "Attempting to attach shader object that hasn't been compiled: " << object << LL_ENDL;
|
||||
return FALSE;
|
||||
@@ -262,6 +264,20 @@ void LLGLSLShader::attachObject(GLhandleARB object)
|
||||
{
|
||||
if (object != 0)
|
||||
{
|
||||
std::multimap<std::string, LLShaderMgr::CachedObjectInfo>::iterator it = LLShaderMgr::instance()->mShaderObjects.begin();
|
||||
for(; it!=LLShaderMgr::instance()->mShaderObjects.end(); it++)
|
||||
{
|
||||
if((*it).second.mHandle == object)
|
||||
{
|
||||
LL_DEBUGS("ShaderLoading") << "Attached: " << (*it).first << llendl;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(it == LLShaderMgr::instance()->mShaderObjects.end())
|
||||
{
|
||||
LL_WARNS("ShaderLoading") << "Attached unknown shader!" << llendl;
|
||||
}
|
||||
|
||||
stop_glerror();
|
||||
glAttachObjectARB(mProgramObject, object);
|
||||
stop_glerror();
|
||||
|
||||
@@ -525,6 +525,14 @@ void LLShaderMgr::dumpObjectLog(GLhandleARB ret, BOOL warns)
|
||||
|
||||
GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_level, GLenum type, S32 texture_index_channels)
|
||||
{
|
||||
std::pair<std::multimap<std::string, CachedObjectInfo >::iterator, std::multimap<std::string, CachedObjectInfo>::iterator> range;
|
||||
range = mShaderObjects.equal_range(filename);
|
||||
for (std::multimap<std::string, CachedObjectInfo>::iterator it = range.first; it != range.second;++it)
|
||||
{
|
||||
if((*it).second.mLevel == shader_level && (*it).second.mType == type)
|
||||
return (*it).second.mHandle;
|
||||
}
|
||||
|
||||
GLenum error = GL_NO_ERROR;
|
||||
if (gDebugGL)
|
||||
{
|
||||
@@ -888,7 +896,7 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
|
||||
if (ret)
|
||||
{
|
||||
// Add shader file to map
|
||||
mShaderObjects[filename] = ret;
|
||||
mShaderObjects.insert(make_pair(filename,CachedObjectInfo(ret,try_gpu_class,type)));
|
||||
shader_level = try_gpu_class;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -185,8 +185,16 @@ public:
|
||||
virtual void updateShaderUniforms(LLGLSLShader * shader) = 0; // Pure Virtual
|
||||
|
||||
public:
|
||||
struct CachedObjectInfo
|
||||
{
|
||||
CachedObjectInfo(GLhandleARB handle, U32 level, GLenum type) :
|
||||
mHandle(handle), mLevel(level), mType(type) {}
|
||||
GLhandleARB mHandle; //Actual handle of the opengl shader object.
|
||||
U32 mLevel; //Level /might/ not be needed, but it's stored to ensure there's no change in behavior.
|
||||
GLenum mType; //GL_VERTEX_SHADER_ARB or GL_FRAGMENT_SHADER_ARB. Tracked because some utility shaders can be loaded as both types (carefully).
|
||||
};
|
||||
// Map of shader names to compiled
|
||||
std::map<std::string, GLhandleARB> mShaderObjects;
|
||||
std::multimap<std::string, CachedObjectInfo > mShaderObjects; //Singu Note: Packing more info here. Doing such provides capability to skip unneeded duplicate loading..
|
||||
|
||||
//global (reserved slot) shader parameters
|
||||
std::vector<std::string> mReservedAttribs;
|
||||
|
||||
@@ -63,8 +63,8 @@ add_library (llvfs ${llvfs_SOURCE_FILES})
|
||||
add_dependencies(llvfs prepare)
|
||||
|
||||
target_link_libraries(llvfs
|
||||
${BOOST_FILESYSTEM_LIBRARY}
|
||||
${BOOST_SYSTEM_LIBRARY}
|
||||
${Boost_FILESYSTEM_LIBRARY}
|
||||
${Boost_SYSTEM_LIBRARY}
|
||||
)
|
||||
|
||||
if (DARWIN)
|
||||
|
||||
@@ -56,12 +56,6 @@ void parse_string();
|
||||
|
||||
#define ECHO do { } while (0)
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" { int yylex( void ); }
|
||||
extern "C" { int yyparse( void ); }
|
||||
extern "C" { int yyerror(const char *fmt, ...); }
|
||||
#endif
|
||||
|
||||
%}
|
||||
|
||||
%%
|
||||
|
||||
@@ -2,10 +2,6 @@
|
||||
#include "linden_common.h"
|
||||
#include "lscript_tree.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
int yylex(void);
|
||||
int yyparse( void );
|
||||
int yyerror(const char *fmt, ...);
|
||||
@@ -19,10 +15,6 @@
|
||||
#pragma warning (disable : 4702) // warning C4702: unreachable code
|
||||
#pragma warning( disable : 4065 ) // warning: switch statement contains 'default' but no 'case' labels
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
%}
|
||||
|
||||
%union
|
||||
|
||||
@@ -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