This commit is contained in:
Lirusaito
2012-09-23 10:25:22 -04:00
99 changed files with 13244 additions and 266 deletions

View File

@@ -10,9 +10,10 @@ include(ELFIO)
if(FMODEX)
include(FMODEX)
set(FMOD OFF)
else(FMODEX)
include(FMOD)
endif(FMODEX)
if(FMOD)
include(FMOD)
endif(FMOD)
include(OPENAL)
include(FindOpenGL)
include(Hunspell)
@@ -1368,13 +1369,10 @@ if (FMOD OR FMODEX)
set(LLSTARTUP_COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS} -DLL_FMOD")
endif (FMOD)
if (DARWIN)
if(FMOD)
if (DARWIN AND FMOD)
set(fmodwrapper_SOURCE_FILES fmodwrapper.cpp)
add_library(fmodwrapper SHARED ${fmodwrapper_SOURCE_FILES})
if (FMOD)
set(fmodwrapper_needed_LIBRARIES ${FMOD_LIBRARY} ${CARBON_LIBRARY})
endif (FMOD)
set(fmodwrapper_needed_LIBRARIES ${FMOD_LIBRARY} ${CARBON_LIBRARY})
set_target_properties(
fmodwrapper
PROPERTIES
@@ -1384,11 +1382,7 @@ if (FMOD OR FMODEX)
)
set(FMODWRAPPER_LIBRARY fmodwrapper)
target_link_libraries(fmodwrapper ${fmodwrapper_needed_LIBRARIES})
endif(FMOD)
if(FMODEX)
set(FMODWRAPPER_LIBRARY ${FMODEX_LIBRARY})
endif(FMODEX)
else (DARWIN)
else (DARWIN AND FMOD)
# fmodwrapper unnecessary on linux or windows, for fmod and fmodex
if (FMODEX)
set(FMODWRAPPER_LIBRARY ${FMODEX_LIBRARY})
@@ -1396,7 +1390,7 @@ if (FMOD OR FMODEX)
if (FMOD)
set(FMODWRAPPER_LIBRARY ${FMOD_LIBRARY})
endif (FMOD)
endif (DARWIN)
endif (DARWIN AND FMOD)
endif (FMOD OR FMODEX)
set_source_files_properties(llstartup.cpp PROPERTIES COMPILE_FLAGS "${LLSTARTUP_COMPILE_FLAGS}")
@@ -1432,9 +1426,9 @@ set(PACKAGE ${PACKAGE_DEFAULT} CACHE BOOL
if (WINDOWS)
if(MSVC10)
set(release_flags "/MAPRelease/${VIEWER_BINARY_NAME}.map")
else()
else(MSVC10)
set(release_flags "/MAP:Release/${VIEWER_BINARY_NAME}.map")
endif()
endif(MSVC10)
if (FMOD)
if(MANIFEST_LIBRARIES)

View File

@@ -210,7 +210,24 @@ bool stort_calls(const std::pair<std::string, U32>& left, const std::pair<std::s
#endif //PROF_CTRL_CALLS
bool cmd_line_chat(std::string revised_text, EChatType type)
{
if(gSavedSettings.getBOOL("AscentCmdLine"))
static LLCachedControl<bool> sAscentCmdLine(gSavedSettings, "AscentCmdLine");
static LLCachedControl<std::string> sAscentCmdLinePos(gSavedSettings, "AscentCmdLinePos");
static LLCachedControl<std::string> sAscentCmdLineDrawDistance(gSavedSettings, "AscentCmdLineDrawDistance");
static LLCachedControl<std::string> sAscentCmdTeleportToCam(gSavedSettings, "AscentCmdTeleportToCam");
static LLCachedControl<std::string> sAscentCmdLineKeyToName(gSavedSettings, "AscentCmdLineKeyToName");
static LLCachedControl<std::string> sAscentCmdLineOfferTp(gSavedSettings, "AscentCmdLineOfferTp");
static LLCachedControl<std::string> sAscentCmdLineGround(gSavedSettings, "AscentCmdLineGround");
static LLCachedControl<std::string> sAscentCmdLineHeight(gSavedSettings, "AscentCmdLineHeight");
static LLCachedControl<std::string> sAscentCmdLineTeleportHome(gSavedSettings, "AscentCmdLineTeleportHome");
static LLCachedControl<std::string> sAscentCmdLineRezPlatform(gSavedSettings, "AscentCmdLineRezPlatform");
static LLCachedControl<std::string> sAscentCmdLineMapTo(gSavedSettings, "AscentCmdLineMapTo");
static LLCachedControl<bool> sAscentCmdLineMapToKeepPos(gSavedSettings, "AscentMapToKeepPos");
static LLCachedControl<std::string> sAscentCmdLineCalc(gSavedSettings, "AscentCmdLineCalc");
static LLCachedControl<std::string> sAscentCmdLineTP2(gSavedSettings, "AscentCmdLineTP2");
static LLCachedControl<std::string> sSinguCmdLineClearChat(gSavedSettings, "SinguCmdLineAway");
static LLCachedControl<std::string> sAscentCmdLineClearChat(gSavedSettings, "AscentCmdLineClearChat");
if(sAscentCmdLine)
{
std::istringstream i(revised_text);
std::string command;
@@ -218,7 +235,7 @@ bool cmd_line_chat(std::string revised_text, EChatType type)
command = utf8str_tolower(command);
if(command != "")
{
if(command == utf8str_tolower(gSavedSettings.getString("AscentCmdLinePos")))
if(command == utf8str_tolower(sAscentCmdLinePos))
{
F32 x,y,z;
if (i >> x)
@@ -241,74 +258,73 @@ bool cmd_line_chat(std::string revised_text, EChatType type)
}
}
}
else if(command == utf8str_tolower(gSavedSettings.getString("AscentCmdLineDrawDistance")))
else if(command == utf8str_tolower(sAscentCmdLineDrawDistance))
{
int drawDist;
if(i >> drawDist)
{
gSavedSettings.setF32("RenderFarClip", drawDist);
gAgentCamera.mDrawDistance=drawDist;
char buffer[DB_IM_MSG_BUF_SIZE * 2]; /* Flawfinder: ignore */
snprintf(buffer,sizeof(buffer),"Draw distance set to: %dm",drawDist);
int drawDist;
if(i >> drawDist)
{
gSavedSettings.setF32("RenderFarClip", drawDist);
gAgentCamera.mDrawDistance=drawDist;
char buffer[DB_IM_MSG_BUF_SIZE * 2]; /* Flawfinder: ignore */
snprintf(buffer,sizeof(buffer),"Draw distance set to: %dm",drawDist);
cmdline_printchat(std::string(buffer));
return false;
}
}
}
else if(command == utf8str_tolower(gSavedSettings.getString("AscentCmdTeleportToCam")))
{
else if(command == utf8str_tolower(sAscentCmdTeleportToCam))
{
gAgent.teleportViaLocation(gAgentCamera.getCameraPositionGlobal());
return false;
}
else if(command == utf8str_tolower(gSavedSettings.getString("AscentCmdLineKeyToName")))
{
LLUUID targetKey;
if(i >> targetKey)
{
std::string object_name;
gCacheName->getFullName(targetKey, object_name);
char buffer[DB_IM_MSG_BUF_SIZE * 2]; /* Flawfinder: ignore */
snprintf(buffer,sizeof(buffer),"%s: (%s)",targetKey.asString().c_str(), object_name.c_str());
}
else if(command == utf8str_tolower(sAscentCmdLineKeyToName))
{
LLUUID targetKey;
if(i >> targetKey)
{
std::string object_name;
gCacheName->getFullName(targetKey, object_name);
char buffer[DB_IM_MSG_BUF_SIZE * 2]; /* Flawfinder: ignore */
snprintf(buffer,sizeof(buffer),"%s: (%s)",targetKey.asString().c_str(), object_name.c_str());
cmdline_printchat(std::string(buffer));
}
}
return false;
}
else if(command == utf8str_tolower(gSavedSettings.getString("AscentCmdLineOfferTp")))
{
std::string avatarKey;
}
else if(command == utf8str_tolower(sAscentCmdLineOfferTp))
{
std::string avatarKey;
// llinfos << "CMD DEBUG 0 " << command << " " << avatarName << llendl;
if(i >> avatarKey)
{
if(i >> avatarKey)
{
// llinfos << "CMD DEBUG 0 afterif " << command << " " << avatarName << llendl;
LLUUID tempUUID;
if(LLUUID::parseUUID(avatarKey, &tempUUID))
{
char buffer[DB_IM_MSG_BUF_SIZE * 2]; /* Flawfinder: ignore */
LLDynamicArray<LLUUID> ids;
ids.push_back(tempUUID);
std::string tpMsg="Join me!";
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_StartLure);
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->nextBlockFast(_PREHASH_Info);
msg->addU8Fast(_PREHASH_LureType, (U8)0);
LLUUID tempUUID;
if(LLUUID::parseUUID(avatarKey, &tempUUID))
{
char buffer[DB_IM_MSG_BUF_SIZE * 2]; /* Flawfinder: ignore */
LLDynamicArray<LLUUID> ids;
ids.push_back(tempUUID);
std::string tpMsg="Join me!";
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_StartLure);
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->nextBlockFast(_PREHASH_Info);
msg->addU8Fast(_PREHASH_LureType, (U8)0);
msg->addStringFast(_PREHASH_Message, tpMsg);
for(LLDynamicArray<LLUUID>::iterator itr = ids.begin(); itr != ids.end(); ++itr)
{
msg->nextBlockFast(_PREHASH_TargetData);
msg->addUUIDFast(_PREHASH_TargetID, *itr);
}
gAgent.sendReliableMessage();
snprintf(buffer,sizeof(buffer),"Offered TP to key %s",tempUUID.asString().c_str());
msg->addStringFast(_PREHASH_Message, tpMsg);
for(LLDynamicArray<LLUUID>::iterator itr = ids.begin(); itr != ids.end(); ++itr)
{
msg->nextBlockFast(_PREHASH_TargetData);
msg->addUUIDFast(_PREHASH_TargetID, *itr);
}
gAgent.sendReliableMessage();
snprintf(buffer,sizeof(buffer),"Offered TP to key %s",tempUUID.asString().c_str());
cmdline_printchat(std::string(buffer));
return false;
}
}
}
else if(command == utf8str_tolower(gSavedSettings.getString("AscentCmdLineGround")))
}
}
}
else if(command == utf8str_tolower(sAscentCmdLineGround))
{
LLVector3 agentPos = gAgent.getPositionAgent();
U64 agentRegion = gAgent.getRegion()->getHandle();
@@ -317,7 +333,8 @@ bool cmd_line_chat(std::string revised_text, EChatType type)
pos_global += LLVector3d((F64)targetPos.mV[0],(F64)targetPos.mV[1],(F64)targetPos.mV[2]);
gAgent.teleportViaLocation(pos_global);
return false;
}else if(command == utf8str_tolower(gSavedSettings.getString("AscentCmdLineHeight")))
}
else if(command == utf8str_tolower(sAscentCmdLineHeight))
{
F32 z;
if(i >> z)
@@ -330,17 +347,20 @@ bool cmd_line_chat(std::string revised_text, EChatType type)
gAgent.teleportViaLocation(pos_global);
return false;
}
}else if(command == utf8str_tolower(gSavedSettings.getString("AscentCmdLineTeleportHome")))
}
else if(command == utf8str_tolower(sAscentCmdLineTeleportHome))
{
gAgent.teleportHome();
return false;
}else if(command == utf8str_tolower(gSavedSettings.getString("AscentCmdLineRezPlatform")))
{
}
else if(command == utf8str_tolower(sAscentCmdLineRezPlatform))
{
F32 width;
if (i >> width) cmdline_rezplat(false, width);
else cmdline_rezplat();
return false;
}else if(command == utf8str_tolower(gSavedSettings.getString("AscentCmdLineMapTo")))
}
else if(command == utf8str_tolower(sAscentCmdLineMapTo))
{
if (revised_text.length() > command.length() + 1) //Typing this command with no argument was causing a crash. -Madgeek
{
@@ -351,7 +371,7 @@ bool cmd_line_chat(std::string revised_text, EChatType type)
std::string region_name = LLWeb::escapeURL(revised_text.substr(command.length()+1));
std::string url;
if(!gSavedSettings.getBOOL("AscentMapToKeepPos"))
if(!sAscentCmdLineMapToKeepPos)
{
agent_x = 128;
agent_y = 128;
@@ -362,7 +382,8 @@ bool cmd_line_chat(std::string revised_text, EChatType type)
LLURLDispatcher::dispatch(url, NULL, true);
}
return false;
}else if(command == utf8str_tolower(gSavedSettings.getString("AscentCmdLineCalc")))//Cryogenic Blitz
}
else if(command == utf8str_tolower(sAscentCmdLineCalc))//Cryogenic Blitz
{
bool success;
F32 result = 0.f;
@@ -391,7 +412,8 @@ bool cmd_line_chat(std::string revised_text, EChatType type)
cmdline_printchat(out);
return false;
}
}else if(command == utf8str_tolower(gSavedSettings.getString("AscentCmdLineTP2")))
}
else if(command == utf8str_tolower(sAscentCmdLineTP2))
{
if (revised_text.length() > command.length() + 1) //Typing this command with no argument was causing a crash. -Madgeek
{
@@ -399,11 +421,13 @@ bool cmd_line_chat(std::string revised_text, EChatType type)
cmdline_tp2name(name);
}
return false;
}else if(command == utf8str_tolower(gSavedSettings.getString("SinguCmdLineAway")))
}
else if(command == utf8str_tolower(sSinguCmdLineClearChat))
{
handle_fake_away_status(NULL);
return false;
}else if(command == "typingstop")
}
else if(command == "typingstop")
{
std::string text;
if(i >> text)
@@ -411,7 +435,7 @@ bool cmd_line_chat(std::string revised_text, EChatType type)
gChatBar->sendChatFromViewer(text, CHAT_TYPE_STOP, FALSE);
}
}
else if(command == utf8str_tolower(gSavedSettings.getString("AscentCmdLineClearChat")))
else if(command == utf8str_tolower(sAscentCmdLineClearChat))
{
LLFloaterChat* chat = LLFloaterChat::getInstance(LLSD());
if(chat)
@@ -422,7 +446,8 @@ bool cmd_line_chat(std::string revised_text, EChatType type)
history_editor_with_mute->clear();
return false;
}
}else if(command == "invrepair")
}
else if(command == "invrepair")
{
invrepair();
}
@@ -513,55 +538,61 @@ void cmdline_tp2name(std::string target)
void cmdline_rezplat(bool use_saved_value, F32 visual_radius) //cmdline_rezplat() will still work... just will use the saved value
{
LLVector3 agentPos = gAgent.getPositionAgent()+(gAgent.getVelocity()*(F32)0.333);
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_ObjectAdd);
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->addUUIDFast(_PREHASH_GroupID, gAgent.getGroupID());
msg->nextBlockFast(_PREHASH_ObjectData);
msg->addU8Fast(_PREHASH_PCode, LL_PCODE_VOLUME);
msg->addU8Fast(_PREHASH_Material, LL_MCODE_METAL);
LLVector3 agentPos = gAgent.getPositionAgent()+(gAgent.getVelocity()*(F32)0.333);
LLMessageSystem* msg = gMessageSystem;
msg->newMessageFast(_PREHASH_ObjectAdd);
msg->nextBlockFast(_PREHASH_AgentData);
msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
msg->addUUIDFast(_PREHASH_GroupID, gAgent.getGroupID());
msg->nextBlockFast(_PREHASH_ObjectData);
msg->addU8Fast(_PREHASH_PCode, LL_PCODE_VOLUME);
msg->addU8Fast(_PREHASH_Material, LL_MCODE_METAL);
if(agentPos.mV[2] > 4096.0)msg->addU32Fast(_PREHASH_AddFlags, FLAGS_CREATE_SELECTED);
else msg->addU32Fast(_PREHASH_AddFlags, 0);
if(agentPos.mV[2] > 4096.0)
msg->addU32Fast(_PREHASH_AddFlags, FLAGS_CREATE_SELECTED);
else
msg->addU32Fast(_PREHASH_AddFlags, 0);
LLVolumeParams volume_params;
LLVolumeParams volume_params;
volume_params.setType( LL_PCODE_PROFILE_CIRCLE, LL_PCODE_PATH_CIRCLE_33 );
volume_params.setRatio ( 2, 2 );
volume_params.setShear ( 0, 0 );
volume_params.setTaper(2.0f,2.0f);
volume_params.setTaperX(0.f);
volume_params.setTaperY(0.f);
volume_params.setType( LL_PCODE_PROFILE_CIRCLE, LL_PCODE_PATH_CIRCLE_33 );
volume_params.setRatio( 2, 2 );
volume_params.setShear( 0, 0 );
volume_params.setTaper(2.0f,2.0f);
volume_params.setTaperX(0.f);
volume_params.setTaperY(0.f);
LLVolumeMessage::packVolumeParams(&volume_params, msg);
LLVector3 rezpos = agentPos - LLVector3(0.0f,0.0f,2.5f);
LLQuaternion rotation;
rotation.setQuat(90.f * DEG_TO_RAD, LLVector3::y_axis);
LLVolumeMessage::packVolumeParams(&volume_params, msg);
LLVector3 rezpos = agentPos - LLVector3(0.0f,0.0f,2.5f);
LLQuaternion rotation;
rotation.setQuat(90.f * DEG_TO_RAD, LLVector3::y_axis);
if (use_saved_value)
{
visual_radius = gSavedSettings.getF32("AscentPlatformSize");
}
if (use_saved_value) visual_radius = gSavedSettings.getF32("AscentPlatformSize");
F32 realsize = visual_radius / 3.0f;
if (realsize < 0.01f) realsize = 0.01f;
else if (realsize > 10.0f) realsize = 10.0f;
msg->addVector3Fast(_PREHASH_Scale, LLVector3(0.01f,realsize,realsize) );
msg->addQuatFast(_PREHASH_Rotation, rotation );
msg->addVector3Fast(_PREHASH_RayStart, rezpos );
msg->addVector3Fast(_PREHASH_RayEnd, rezpos );
msg->addU8Fast(_PREHASH_BypassRaycast, (U8)1 );
msg->addU8Fast(_PREHASH_RayEndIsIntersection, (U8)FALSE );
msg->addU8Fast(_PREHASH_State, 0);
msg->addUUIDFast(_PREHASH_RayTargetID, LLUUID::null );
msg->sendReliable(gAgent.getRegionHost());
msg->addVector3Fast(_PREHASH_Scale, LLVector3(0.01f,realsize,realsize) );
msg->addQuatFast(_PREHASH_Rotation, rotation );
msg->addVector3Fast(_PREHASH_RayStart, rezpos );
msg->addVector3Fast(_PREHASH_RayEnd, rezpos );
msg->addU8Fast(_PREHASH_BypassRaycast, (U8)1 );
msg->addU8Fast(_PREHASH_RayEndIsIntersection, (U8)FALSE );
msg->addU8Fast(_PREHASH_State, 0);
msg->addUUIDFast(_PREHASH_RayTargetID, LLUUID::null );
msg->sendReliable(gAgent.getRegionHost());
}
void cmdline_printchat(std::string message)
{
LLChat chat;
chat.mText = message;
LLChat chat;
chat.mText = message;
chat.mSourceType = CHAT_SOURCE_SYSTEM;
LLFloaterChat::addChat(chat, FALSE, FALSE);
LLFloaterChat::addChat(chat, FALSE, FALSE);
}

View File

@@ -316,10 +316,10 @@ BOOL gLogoutInProgress = FALSE;
// Internal globals... that should be removed.
static std::string gArgs;
const std::string MARKER_FILE_NAME("SecondLife.exec_marker");
const std::string ERROR_MARKER_FILE_NAME("SecondLife.error_marker");
const std::string LLERROR_MARKER_FILE_NAME("SecondLife.llerror_marker");
const std::string LOGOUT_MARKER_FILE_NAME("SecondLife.logout_marker");
const std::string MARKER_FILE_NAME("Singularity.exec_marker");
const std::string ERROR_MARKER_FILE_NAME("Singularity.error_marker");
const std::string LLERROR_MARKER_FILE_NAME("Singularity.llerror_marker");
const std::string LOGOUT_MARKER_FILE_NAME("Singularity.logout_marker");
static BOOL gDoDisconnect = FALSE;
// <edit>
//static BOOL gBusyDisconnect = FALSE;
@@ -1017,6 +1017,8 @@ void LLAppViewer::checkMemory()
static LLFastTimer::DeclareTimer FTM_MESSAGES("System Messages");
static LLFastTimer::DeclareTimer FTM_SLEEP("Sleep");
static LLFastTimer::DeclareTimer FTM_YIELD("Yield");
static LLFastTimer::DeclareTimer FTM_TEXTURE_CACHE("Texture Cache");
static LLFastTimer::DeclareTimer FTM_DECODE("Image Decode");
static LLFastTimer::DeclareTimer FTM_VFS("VFS Thread");
@@ -1084,7 +1086,7 @@ bool LLAppViewer::mainLoop()
LLFastTimer t2(FTM_MESSAGES);
gViewerWindow->getWindow()->processMiscNativeEvents();
}
pingMainloopTimeout("Main:GatherInput");
if (gViewerWindow)
@@ -1207,6 +1209,7 @@ bool LLAppViewer::mainLoop()
// yield some time to the os based on command line option
if(mYieldTime >= 0)
{
LLFastTimer t(FTM_YIELD);
ms_sleep(mYieldTime);
}
@@ -1869,15 +1872,15 @@ bool LLAppViewer::initLogging()
// Remove the last ".old" log file.
std::string old_log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,
"SecondLife.old");
"Singularity.old");
LLFile::remove(old_log_file);
// Rename current log file to ".old"
std::string log_file = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,
"SecondLife.log");
"Singularity.log");
LLFile::rename(log_file, old_log_file);
// Set the log file to SecondLife.log
// Set the log file to Singularity.log
LLError::logToFile(log_file);
@@ -2931,10 +2934,10 @@ void LLAppViewer::initMarkerFile()
LL_DEBUGS("MarkerFile") << "Checking marker file for lock..." << LL_ENDL;
//We've got 4 things to test for here
// - Other Process Running (SecondLife.exec_marker present, locked)
// - Freeze (SecondLife.exec_marker present, not locked)
// - LLError Crash (SecondLife.llerror_marker present)
// - Other Crash (SecondLife.error_marker present)
// - Other Process Running (Singularity.exec_marker present, locked)
// - Freeze (Singularity.exec_marker present, not locked)
// - LLError Crash (Singularity.llerror_marker present)
// - Other Crash (Singularity.error_marker present)
// These checks should also remove these files for the last 2 cases if they currently exist
//LLError/Error checks. Only one of these should ever happen at a time.

View File

@@ -99,7 +99,6 @@ S32 AVATAR_OFFSET_TEX0 = 32;
S32 AVATAR_OFFSET_TEX1 = 40;
S32 AVATAR_VERTEX_BYTES = 48;
BOOL gAvatarEmbossBumpMap = FALSE;
static BOOL sRenderingSkinned = FALSE;
S32 normal_channel = -1;
@@ -1040,9 +1039,12 @@ void LLDrawPoolAvatar::endDeferredSkinned()
gGL.getTexUnit(0)->activate();
}
static LLFastTimer::DeclareTimer FTM_RENDER_AVATARS("renderAvatars");
void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
{
LLFastTimer t(FTM_RENDER_AVATARS);
if (pass == -1)
{
for (S32 i = 1; i < getNumPasses(); i++)
@@ -1546,8 +1548,12 @@ void LLDrawPoolAvatar::renderDeferredRiggedBump(LLVOAvatar* avatar)
renderRigged(avatar, RIGGED_DEFERRED_BUMP);
}
static LLFastTimer::DeclareTimer FTM_RIGGED_VBO("Rigged VBO");
void LLDrawPoolAvatar::updateRiggedVertexBuffers(LLVOAvatar* avatar)
{
LLFastTimer t(FTM_RIGGED_VBO);
//update rigged vertex buffers
for (U32 type = 0; type < NUM_RIGGED_PASSES; ++type)
{

View File

@@ -1912,8 +1912,12 @@ BOOL LLPolySkeletalDistortion::setInfo(LLPolySkeletalDistortionInfo *info)
//-----------------------------------------------------------------------------
// apply()
//-----------------------------------------------------------------------------
static LLFastTimer::DeclareTimer FTM_POLYSKELETAL_DISTORTION_APPLY("Skeletal Distortion");
void LLPolySkeletalDistortion::apply( ESex avatar_sex )
{
LLFastTimer t(FTM_POLYSKELETAL_DISTORTION_APPLY);
F32 effective_weight = ( getSex() & avatar_sex ) ? mCurWeight : getDefaultWeight();
LLJoint* joint;

View File

@@ -781,6 +781,8 @@ F32 LLPolyMorphTarget::getMaxDistortion()
//-----------------------------------------------------------------------------
// apply()
//-----------------------------------------------------------------------------
static LLFastTimer::DeclareTimer FTM_APPLY_MORPH_TARGET("Apply Morph");
void LLPolyMorphTarget::apply( ESex avatar_sex )
{
if (!mMorphData || mNumMorphMasksPending > 0)
@@ -788,6 +790,8 @@ void LLPolyMorphTarget::apply( ESex avatar_sex )
return;
}
LLFastTimer t(FTM_APPLY_MORPH_TARGET);
mLastSex = avatar_sex;
// Check for NaN condition (NaN is detected if a variable doesn't equal itself.

View File

@@ -1503,6 +1503,10 @@ void LLViewerObjectList::onPhysicsFlagsFetchFailure(const LLUUID& object_id)
mPendingPhysicsFlags.erase(object_id);
}
static LLFastTimer::DeclareTimer FTM_SHIFT_OBJECTS("Shift Objects");
static LLFastTimer::DeclareTimer FTM_PIPELINE_SHIFT("Pipeline Shift");
static LLFastTimer::DeclareTimer FTM_REGION_SHIFT("Region Shift");
void LLViewerObjectList::shiftObjects(const LLVector3 &offset)
{
// This is called when we shift our origin when we cross region boundaries...
@@ -1514,6 +1518,8 @@ void LLViewerObjectList::shiftObjects(const LLVector3 &offset)
return;
}
LLFastTimer t(FTM_SHIFT_OBJECTS);
LLViewerObject *objectp;
for (vobj_list_t::iterator iter = mObjects.begin(); iter != mObjects.end(); ++iter)
{
@@ -1530,8 +1536,15 @@ void LLViewerObjectList::shiftObjects(const LLVector3 &offset)
}
}
gPipeline.shiftObjects(offset);
LLWorld::getInstance()->shiftRegions(offset);
{
LLFastTimer t(FTM_PIPELINE_SHIFT);
gPipeline.shiftObjects(offset);
}
{
LLFastTimer t(FTM_REGION_SHIFT);
LLWorld::getInstance()->shiftRegions(offset);
}
}
void LLViewerObjectList::repartitionObjects()
@@ -2066,8 +2079,8 @@ void LLViewerObjectList::findOrphans(LLViewerObject* objectp, U32 ip, U32 port)
llinfos << "Agent: " << objectp->getPositionAgent() << llendl;
addDebugBeacon(objectp->getPositionAgent(),"");
#endif
gPipeline.markMoved(objectp->mDrawable);
objectp->setChanged(LLXform::MOVED | LLXform::SILHOUETTE);
gPipeline.markMoved(objectp->mDrawable);
objectp->setChanged(LLXform::MOVED | LLXform::SILHOUETTE);
// Flag the object as no longer orphaned
childp->mOrphaned = FALSE;

View File

@@ -330,6 +330,7 @@ BOOL LLVOGrass::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time)
return TRUE ;
}
if (mPatch && (mLastPatchUpdateTime != mPatch->getLastUpdateTime()))
{
gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_VOLUME, TRUE);

View File

@@ -167,6 +167,7 @@ void LLVOPartGroup::freeVBSlot(S32 idx)
*sVBSlotCursor = idx;
}
}
LLVOPartGroup::LLVOPartGroup(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp)
: LLAlphaObject(id, pcode, regionp),
mViewerPartGroupp(NULL)
@@ -181,7 +182,6 @@ LLVOPartGroup::~LLVOPartGroup()
{
}
BOOL LLVOPartGroup::isActive() const
{
return FALSE;

View File

@@ -352,7 +352,6 @@ LLVOSky::LLVOSky(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp)
cloud_pos_density1 = LLColor3();
cloud_pos_density2 = LLColor3();
mInitialized = FALSE;
mbCanSelect = FALSE;
mUpdateTimer.reset();
@@ -409,7 +408,6 @@ LLVOSky::~LLVOSky()
mCubeMap = NULL;
}
void LLVOSky::init()
{
const F32 haze_int = color_intens(mHaze.calcSigSca(0));
@@ -1250,6 +1248,7 @@ void LLVOSky::createDummyVertexBuffer()
}
static LLFastTimer::DeclareTimer FTM_RENDER_FAKE_VBO_UPDATE("Fake VBO Update");
void LLVOSky::updateDummyVertexBuffer()
{
if(!LLVertexBuffer::sEnableVBOs)
@@ -1491,6 +1490,7 @@ BOOL LLVOSky::updateHeavenlyBodyGeometry(LLDrawable *drawable, const S32 f, cons
}
llassert(facep->getVertexBuffer()->getNumIndices() == 6);
index_offset = facep->getGeometry(verticesp,normalsp,texCoordsp, indicesp);
if (-1 == index_offset)

View File

@@ -894,7 +894,6 @@ void LLVOTree::updateMesh()
S32 stop_depth = 0;
F32 alpha = 1.0;
U32 vert_count = 0;
U32 index_count = 0;

View File

@@ -140,6 +140,7 @@ LLDrawable *LLVOWater::createDrawable(LLPipeline *pipeline)
}
static LLFastTimer::DeclareTimer FTM_UPDATE_WATER("Update Water");
BOOL LLVOWater::updateGeometry(LLDrawable *drawable)
{
LLFastTimer ftm(FTM_UPDATE_WATER);
@@ -213,6 +214,7 @@ BOOL LLVOWater::updateGeometry(LLDrawable *drawable)
{ //bump edge patches down 10 cm to prevent aliasing along edges
z_fudge = -0.1f;
}
for (y = 0; y < size; y++)
{
for (x = 0; x < size; x++)

View File

@@ -354,6 +354,7 @@ BOOL LLVOWLSky::updateGeometry(LLDrawable * drawable)
llinfos << "WL Skydome strips in " << strips_segments << " batches." << llendl;
mStripsVerts.resize(strips_segments, NULL);
LLTimer timer;
timer.start();

View File

@@ -1253,9 +1253,11 @@ void LLWorld::disconnectRegions()
}
}
static LLFastTimer::DeclareTimer FTM_ENABLE_SIMULATOR("Enable Sim");
void process_enable_simulator(LLMessageSystem *msg, void **user_data)
{
LLFastTimer t(FTM_ENABLE_SIMULATOR);
// enable the appropriate circuit for this simulator and
// add its values into the gSimulator structure
U64 handle;

View File

@@ -110,7 +110,7 @@
#include "llspatialpartition.h"
#include "llmutelist.h"
// [RLVa:KB]
// [RLVa:KB] - Checked: 2011-05-22 (RLVa-1.3.1a)
#include "rlvhandler.h"
#include "rlvlocks.h"
// [/RLVa:KB]
@@ -185,8 +185,13 @@ LLFastTimer::DeclareTimer FTM_RENDER_BUMP("Bump");
LLFastTimer::DeclareTimer FTM_RENDER_FULLBRIGHT("Fullbright");
LLFastTimer::DeclareTimer FTM_RENDER_GLOW("Glow");
LLFastTimer::DeclareTimer FTM_GEO_UPDATE("Geo Update");
LLFastTimer::DeclareTimer FTM_PIPELINE_CREATE("Pipeline Create");
LLFastTimer::DeclareTimer FTM_POOLRENDER("RenderPool");
LLFastTimer::DeclareTimer FTM_POOLS("Pools");
LLFastTimer::DeclareTimer FTM_DEFERRED_POOLRENDER("RenderPool (Deferred)");
LLFastTimer::DeclareTimer FTM_DEFERRED_POOLS("Pools (Deferred)");
LLFastTimer::DeclareTimer FTM_POST_DEFERRED_POOLRENDER("RenderPool (Post)");
LLFastTimer::DeclareTimer FTM_POST_DEFERRED_POOLS("Pools (Post)");
LLFastTimer::DeclareTimer FTM_RENDER_BLOOM_FBO("First FBO");
LLFastTimer::DeclareTimer FTM_STATESORT("Sort Draw State");
LLFastTimer::DeclareTimer FTM_PIPELINE("Pipeline");
@@ -1474,7 +1479,7 @@ U32 LLPipeline::addObject(LLViewerObject *vobj)
void LLPipeline::createObjects(F32 max_dtime)
{
LLFastTimer ftm(FTM_GEO_UPDATE);
LLFastTimer ftm(FTM_PIPELINE_CREATE);
LLMemType mt(LLMemType::MTYPE_PIPELINE_CREATE_OBJECTS);
LLTimer update_timer;
@@ -2311,14 +2316,19 @@ BOOL LLPipeline::updateDrawableGeom(LLDrawable* drawablep, BOOL priority)
static LLFastTimer::DeclareTimer FTM_SEED_VBO_POOLS("Seed VBO Pool");
static LLFastTimer::DeclareTimer FTM_UPDATE_GL("Update GL");
void LLPipeline::updateGL()
{
while (!LLGLUpdate::sGLQ.empty())
{
LLGLUpdate* glu = LLGLUpdate::sGLQ.front();
glu->updateGL();
glu->mInQ = FALSE;
LLGLUpdate::sGLQ.pop_front();
LLFastTimer t(FTM_UPDATE_GL);
while (!LLGLUpdate::sGLQ.empty())
{
LLGLUpdate* glu = LLGLUpdate::sGLQ.front();
glu->updateGL();
glu->mInQ = FALSE;
LLGLUpdate::sGLQ.pop_front();
}
}
/*{ //seed VBO Pools
@@ -2327,11 +2337,14 @@ void LLPipeline::updateGL()
}*/
}
static LLFastTimer::DeclareTimer FTM_REBUILD_PRIORITY_GROUPS("Rebuild Priority Groups");
void LLPipeline::rebuildPriorityGroups()
{
LLFastTimer t(FTM_REBUILD_PRIORITY_GROUPS);
LLTimer update_timer;
LLMemType mt(LLMemType::MTYPE_PIPELINE);
assertInitialized();
gMeshRepo.notifyLoadedMeshes();
@@ -2350,7 +2363,9 @@ void LLPipeline::rebuildPriorityGroups()
mGroupQ1Locked = false;
}
static LLFastTimer::DeclareTimer FTM_REBUILD_GROUPS("Rebuild Groups");
void LLPipeline::rebuildGroups()
{
if (mGroupQ2.empty())
@@ -2358,6 +2373,7 @@ void LLPipeline::rebuildGroups()
return;
}
LLFastTimer t(FTM_REBUILD_GROUPS);
mGroupQ2Locked = true;
// Iterate through some drawables on the non-priority build queue
S32 size = (S32) mGroupQ2.size();
@@ -2614,6 +2630,10 @@ void LLPipeline::markShift(LLDrawable *drawablep)
}
}
static LLFastTimer::DeclareTimer FTM_SHIFT_DRAWABLE("Shift Drawable");
static LLFastTimer::DeclareTimer FTM_SHIFT_OCTREE("Shift Octree");
static LLFastTimer::DeclareTimer FTM_SHIFT_HUD("Shift HUD");
void LLPipeline::shiftObjects(const LLVector3 &offset)
{
LLMemType mt(LLMemType::MTYPE_PIPELINE_SHIFT_OBJECTS);
@@ -2626,35 +2646,44 @@ void LLPipeline::shiftObjects(const LLVector3 &offset)
LLVector4a offseta;
offseta.load3(offset.mV);
for (LLDrawable::drawable_vector_t::iterator iter = mShiftList.begin();
iter != mShiftList.end(); iter++)
{
LLDrawable *drawablep = *iter;
if (drawablep->isDead())
LLFastTimer t(FTM_SHIFT_DRAWABLE);
for (LLDrawable::drawable_vector_t::iterator iter = mShiftList.begin();
iter != mShiftList.end(); iter++)
{
continue;
}
drawablep->shiftPos(offseta);
drawablep->clearState(LLDrawable::ON_SHIFT_LIST);
}
mShiftList.resize(0);
for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
{
LLViewerRegion* region = *iter;
for (U32 i = 0; i < LLViewerRegion::NUM_PARTITIONS; i++)
{
LLSpatialPartition* part = region->getSpatialPartition(i);
if (part)
LLDrawable *drawablep = *iter;
if (drawablep->isDead())
{
part->shift(offseta);
continue;
}
drawablep->shiftPos(offseta);
drawablep->clearState(LLDrawable::ON_SHIFT_LIST);
}
mShiftList.resize(0);
}
{
LLFastTimer t(FTM_SHIFT_OCTREE);
for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
{
LLViewerRegion* region = *iter;
for (U32 i = 0; i < LLViewerRegion::NUM_PARTITIONS; i++)
{
LLSpatialPartition* part = region->getSpatialPartition(i);
if (part)
{
part->shift(offseta);
}
}
}
}
LLHUDText::shiftAll(offset);
LLHUDNameTag::shiftAll(offset);
{
LLFastTimer t(FTM_SHIFT_HUD);
LLHUDText::shiftAll(offset);
LLHUDNameTag::shiftAll(offset);
}
display_update_camera();
}
@@ -2687,8 +2716,10 @@ void LLPipeline::markPartitionMove(LLDrawable* drawable)
}
}
static LLFastTimer::DeclareTimer FTM_PROCESS_PARTITIONQ("PartitionQ");
void LLPipeline::processPartitionQ()
{
LLFastTimer t(FTM_PROCESS_PARTITIONQ);
for (LLDrawable::drawable_list_t::iterator iter = mPartitionQ.begin(); iter != mPartitionQ.end(); ++iter)
{
LLDrawable* drawable = *iter;
@@ -3231,7 +3262,7 @@ void LLPipeline::postSort(LLCamera& camera)
rebuildPriorityGroups();
llpushcallstacks ;
//build render map
for (LLCullResult::sg_iterator i = sCull->beginVisibleGroups(); i != sCull->endVisibleGroups(); ++i)
{
@@ -3852,7 +3883,7 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera)
LLMemType mt_rgd(LLMemType::MTYPE_PIPELINE_RENDER_GEOM_DEFFERRED);
LLFastTimer t(FTM_RENDER_GEOMETRY);
LLFastTimer t2(FTM_POOLS);
LLFastTimer t2(FTM_DEFERRED_POOLS);
LLGLEnable cull(GL_CULL_FACE);
@@ -3895,7 +3926,7 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera)
pool_set_t::iterator iter2 = iter1;
if (hasRenderType(poolp->getType()) && poolp->getNumDeferredPasses() > 0)
{
LLFastTimer t(FTM_POOLRENDER);
LLFastTimer t(FTM_DEFERRED_POOLRENDER);
gGLLastMatrix = NULL;
gGL.loadMatrix(gGLModelView);
@@ -3950,7 +3981,7 @@ void LLPipeline::renderGeomDeferred(LLCamera& camera)
void LLPipeline::renderGeomPostDeferred(LLCamera& camera)
{
LLMemType mt_rgpd(LLMemType::MTYPE_PIPELINE_RENDER_GEOM_POST_DEF);
LLFastTimer t(FTM_POOLS);
LLFastTimer t(FTM_POST_DEFERRED_POOLS);
U32 cur_type = 0;
LLGLEnable cull(GL_CULL_FACE);
@@ -3985,7 +4016,7 @@ void LLPipeline::renderGeomPostDeferred(LLCamera& camera)
pool_set_t::iterator iter2 = iter1;
if (hasRenderType(poolp->getType()) && poolp->getNumPostDeferredPasses() > 0)
{
LLFastTimer t(FTM_POOLRENDER);
LLFastTimer t(FTM_POST_DEFERRED_POOLRENDER);
gGLLastMatrix = NULL;
gGL.loadMatrix(gGLModelView);
@@ -4401,8 +4432,7 @@ void LLPipeline::renderDebug()
gGL.vertex3fv(frust[2].mV); gGL.vertex3fv(frust[6].mV);
gGL.vertex3fv(frust[3].mV); gGL.vertex3fv(frust[7].mV);
gGL.end();
}
}
}
/*gGL.flush();
@@ -4530,8 +4560,11 @@ void LLPipeline::renderDebug()
}
}
static LLFastTimer::DeclareTimer FTM_REBUILD_POOLS("Rebuild Pools");
void LLPipeline::rebuildPools()
{
LLFastTimer t(FTM_REBUILD_POOLS);
LLMemType mt(LLMemType::MTYPE_PIPELINE_REBUILD_POOLS);
assertInitialized();
@@ -6129,13 +6162,16 @@ void LLPipeline::resetVertexBuffers()
{ mResetVertexBuffers = true;
}
static LLFastTimer::DeclareTimer FTM_RESET_VB("Reset VB");
void LLPipeline::doResetVertexBuffers()
{
if (!mResetVertexBuffers)
{
return;
}
LLFastTimer t(FTM_RESET_VB);
mResetVertexBuffers = false;
mCubeVB = NULL;
@@ -6634,7 +6670,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield, b
F32 blur_constant = focal_length*focal_length/(fnumber*(subject_distance-focal_length));
blur_constant /= 1000.f; //convert to meters for shader
F32 magnification = focal_length/(subject_distance-focal_length);
{ //build diffuse+bloom+CoF
mDeferredLight.bindTarget();
shader = &gDeferredCoFProgram;
@@ -7241,7 +7277,7 @@ void LLPipeline::renderDeferredLighting()
static const LLCachedControl<F32> RenderShadowBlurDistFactor("RenderShadowBlurDistFactor",.1f);
static const LLCachedControl<bool> RenderDeferredAtmospheric("RenderDeferredAtmospheric",false);
static const LLCachedControl<bool> RenderLocalLights("RenderLocalLights",false);
{
LLFastTimer ftm(FTM_RENDER_DEFERRED);
@@ -7501,7 +7537,7 @@ void LLPipeline::renderDeferredLighting()
}
mCubeVB->setBuffer(LLVertexBuffer::MAP_VERTEX);
LLGLDepthTest depth(GL_TRUE, GL_FALSE);
for (LLDrawable::drawable_set_t::iterator iter = mLights.begin(); iter != mLights.end(); ++iter)
{
@@ -7547,7 +7583,7 @@ void LLPipeline::renderDeferredLighting()
}
sVisibleLightCount++;
if (camera->getOrigin().mV[0] > c[0] + s + 0.2f ||
camera->getOrigin().mV[0] < c[0] - s - 0.2f ||
camera->getOrigin().mV[1] > c[1] + s + 0.2f ||
@@ -8043,14 +8079,14 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
gGL.setColorMask(true, false);
mWaterRef.getViewport(gGLViewport);
stop_glerror();
gGL.pushMatrix();
mat.set_scale(glh::vec3f(1,1,-1));
mat.set_translate(glh::vec3f(0,0,height*2.f));
glh::matrix4f current = glh_get_current_modelview();
mat = current * mat;
@@ -8070,7 +8106,7 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
glCullFace(GL_FRONT);
static LLCullResult ref_result;
if (LLDrawPoolWater::sNeedsReflectionUpdate)
{
//initial sky pass (no user clip plane)
@@ -8103,10 +8139,10 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
#endif
if (detail < 3)
{
clearRenderTypeMask(LLPipeline::RENDER_TYPE_AVATAR, END_RENDER_TYPES);
clearRenderTypeMask(LLPipeline::RENDER_TYPE_AVATAR, END_RENDER_TYPES);
if (detail < 2)
{
clearRenderTypeMask(LLPipeline::RENDER_TYPE_VOLUME, END_RENDER_TYPES);
clearRenderTypeMask(LLPipeline::RENDER_TYPE_VOLUME, END_RENDER_TYPES);
}
}
}
@@ -8382,7 +8418,7 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera
gDeferredShadowAlphaMaskProgram.bind();
gDeferredShadowAlphaMaskProgram.setMinimumAlpha(0.598f);
gDeferredShadowAlphaMaskProgram.uniform1f(LLShaderMgr::DEFERRED_SHADOW_TARGET_WIDTH, (float)target_width);
U32 mask = LLVertexBuffer::MAP_VERTEX |
LLVertexBuffer::MAP_TEXCOORD0 |
LLVertexBuffer::MAP_COLOR |
@@ -8596,6 +8632,7 @@ BOOL LLPipeline::getVisiblePointCloud(LLCamera& camera, LLVector3& min, LLVector
}
static LLFastTimer::DeclareTimer FTM_GEN_SUN_SHADOW("Gen Sun Shadow");
void LLPipeline::generateSunShadow(LLCamera& camera)
{
@@ -8614,6 +8651,8 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
return;
}
LLFastTimer t(FTM_GEN_SUN_SHADOW);
BOOL skip_avatar_update = FALSE;
if (!isAgentAvatarValid() || gAgentCamera.getCameraAnimating() || gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK || !LLVOAvatar::sVisibleInFirstPerson)
{
@@ -9375,6 +9414,12 @@ void LLPipeline::renderGroups(LLRenderPass* pass, U32 type, U32 mask, BOOL textu
}
}
static LLFastTimer::DeclareTimer FTM_IMPOSTOR_MARK_VISIBLE("Impostor Mark Visible");
static LLFastTimer::DeclareTimer FTM_IMPOSTOR_SETUP("Impostor Setup");
static LLFastTimer::DeclareTimer FTM_IMPOSTOR_BACKGROUND("Impostor Background");
static LLFastTimer::DeclareTimer FTM_IMPOSTOR_ALLOCATE("Impostor Allocate");
static LLFastTimer::DeclareTimer FTM_IMPOSTOR_RESIZE("Impostor Resize");
void LLPipeline::generateImpostor(LLVOAvatar* avatar)
{
LLMemType mt_gi(LLMemType::MTYPE_PIPELINE_GENERATE_IMPOSTOR);
@@ -9430,22 +9475,26 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
sImpostorRender = TRUE;
LLViewerCamera* viewer_camera = LLViewerCamera::getInstance();
markVisible(avatar->mDrawable, *viewer_camera);
LLVOAvatar::sUseImpostors = FALSE;
LLVOAvatar::attachment_map_t::iterator iter;
for (iter = avatar->mAttachmentPoints.begin();
iter != avatar->mAttachmentPoints.end();
++iter)
{
LLViewerJointAttachment *attachment = iter->second;
for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachment->mAttachedObjects.begin();
attachment_iter != attachment->mAttachedObjects.end();
++attachment_iter)
LLFastTimer t(FTM_IMPOSTOR_MARK_VISIBLE);
markVisible(avatar->mDrawable, *viewer_camera);
LLVOAvatar::sUseImpostors = FALSE;
LLVOAvatar::attachment_map_t::iterator iter;
for (iter = avatar->mAttachmentPoints.begin();
iter != avatar->mAttachmentPoints.end();
++iter)
{
if (LLViewerObject* attached_object = (*attachment_iter))
LLViewerJointAttachment *attachment = iter->second;
for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attachment_iter = attachment->mAttachedObjects.begin();
attachment_iter != attachment->mAttachedObjects.end();
++attachment_iter)
{
markVisible(attached_object->mDrawable->getSpatialBridge(), *viewer_camera);
if (LLViewerObject* attached_object = (*attachment_iter))
{
markVisible(attached_object->mDrawable->getSpatialBridge(), *viewer_camera);
}
}
}
}
@@ -9458,6 +9507,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
U32 resX = 0;
{
LLFastTimer t(FTM_IMPOSTOR_SETUP);
const LLVector4a* ext = avatar->mDrawable->getSpatialExtents();
LLVector3 pos(avatar->getRenderPosition()+avatar->getImpostorOffset());
@@ -9512,6 +9562,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
if (!avatar->mImpostor.isComplete())
{
LLFastTimer t(FTM_IMPOSTOR_ALLOCATE);
avatar->mImpostor.allocate(resX,resY,GL_RGBA,TRUE,FALSE);
if (LLPipeline::sRenderDeferred)
@@ -9526,6 +9577,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
else if(resX != avatar->mImpostor.getWidth() ||
resY != avatar->mImpostor.getHeight())
{
LLFastTimer t(FTM_IMPOSTOR_RESIZE);
avatar->mImpostor.resize(resX,resY,GL_RGBA);
}
@@ -9547,6 +9599,7 @@ void LLPipeline::generateImpostor(LLVOAvatar* avatar)
}
{ //create alpha mask based on depth buffer (grey out if muted)
LLFastTimer t(FTM_IMPOSTOR_BACKGROUND);
if (LLPipeline::sRenderDeferred)
{
GLuint buff = GL_COLOR_ATTACHMENT0;

View File

@@ -168,7 +168,7 @@ public:
void markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags flag = LLDrawable::REBUILD_ALL, BOOL priority = FALSE);
void markPartitionMove(LLDrawable* drawablep);
void markMeshDirty(LLSpatialGroup* group);
//get the object between start and end that's closest to start.
LLViewerObject* lineSegmentIntersectInWorld(const LLVector3& start, const LLVector3& end,
BOOL pick_transparent,