Merge git://github.com/Shyotl/SingularityViewer

This commit is contained in:
Siana Gearz
2011-06-18 22:44:31 +02:00
21 changed files with 208 additions and 154 deletions

View File

@@ -1428,6 +1428,7 @@ void LLAgent::stopAutoPilot(BOOL user_cancel)
if (mAutoPilotFinishedCallback)
{
mAutoPilotFinishedCallback(!user_cancel && dist_vec_squared(gAgent.getPositionGlobal(), mAutoPilotTargetGlobal) < (mAutoPilotStopDistance * mAutoPilotStopDistance), mAutoPilotCallbackData);
mAutoPilotFinishedCallback = NULL;
}
mLeaderID = LLUUID::null;

View File

@@ -585,9 +585,10 @@ bool LLAppViewer::init()
// *NOTE:Mani - LLCurl::initClass is not thread safe.
// Called before threads are created.
LLCurl::initClass();
LL_INFOS("InitInfo") << "LLCurl initialized." << LL_ENDL ;
initThreads();
LL_INFOS("InitInfo") << "Threads initialized." << LL_ENDL ; ;
LL_INFOS("InitInfo") << "Threads initialized." << LL_ENDL ;
writeSystemInfo();
@@ -700,7 +701,8 @@ bool LLAppViewer::init()
// Early out from user choice.
return false;
}
LL_INFOS("InitInfo") << "Hardware test initialization done." << LL_ENDL ;
// Always fetch the Ethernet MAC address, needed both for login
// and password load.
LLUUID::getNodeID(gMACAddress);
@@ -2369,8 +2371,9 @@ bool LLAppViewer::initWindow()
// Set this flag in case we crash while initializing GL
gSavedSettings.setBOOL("RenderInitError", TRUE);
gSavedSettings.saveToFile( gSavedSettings.getString("ClientSettingsFile"), TRUE );
gPipeline.init();
LL_INFOS("AppInit") << "gPipeline Initialized" << LL_ENDL;
stop_glerror();
gViewerWindow->initGLDefaults();
@@ -2398,7 +2401,7 @@ bool LLAppViewer::initWindow()
// show viewer window
//gViewerWindow->mWindow->show();
LL_INFOS("AppInit") << "Window initialization done." << LL_ENDL;
return true;
}

View File

@@ -351,26 +351,48 @@ void create_console()
// redirect unbuffered STDOUT to the console
l_std_handle = (long)GetStdHandle(STD_OUTPUT_HANDLE);
h_con_handle = _open_osfhandle(l_std_handle, _O_TEXT);
fp = _fdopen( h_con_handle, "w" );
*stdout = *fp;
setvbuf( stdout, NULL, _IONBF, 0 );
if (h_con_handle == -1)
{
llwarns << "create_console() failed to open stdout handle" << llendl;
}
else
{
fp = _fdopen( h_con_handle, "w" );
*stdout = *fp;
setvbuf( stdout, NULL, _IONBF, 0 );
}
// redirect unbuffered STDIN to the console
l_std_handle = (long)GetStdHandle(STD_INPUT_HANDLE);
h_con_handle = _open_osfhandle(l_std_handle, _O_TEXT);
fp = _fdopen( h_con_handle, "r" );
*stdin = *fp;
setvbuf( stdin, NULL, _IONBF, 0 );
if (h_con_handle == -1)
{
llwarns << "create_console() failed to open stdin handle" << llendl;
}
else
{
fp = _fdopen( h_con_handle, "r" );
*stdin = *fp;
setvbuf( stdin, NULL, _IONBF, 0 );
}
// redirect unbuffered STDERR to the console
l_std_handle = (long)GetStdHandle(STD_ERROR_HANDLE);
h_con_handle = _open_osfhandle(l_std_handle, _O_TEXT);
fp = _fdopen( h_con_handle, "w" );
*stderr = *fp;
setvbuf( stderr, NULL, _IOFBF, 1024 ); //Assigning a buffer improves speed a LOT, esp on vista/win7
//_IOLBF is borked.
if (h_con_handle == -1)
{
llwarns << "create_console() failed to open stderr handle" << llendl;
}
else
{
fp = _fdopen( h_con_handle, "w" );
*stderr = *fp;
setvbuf( stderr, NULL, _IOFBF, 1024 ); //Assigning a buffer improves speed a LOT, esp on vista/win7
//_IOLBF is borked.
}
}
LLAppViewerWin32::LLAppViewerWin32(const char* cmd_line) :
mCmdLine(cmd_line)
{

View File

@@ -100,6 +100,13 @@ void LLStandardBumpmap::restoreGL()
// static
void LLStandardBumpmap::addstandard()
{
if(!gTextureList.isInitialized())
{
//Note: loading pre-configuration sometimes triggers this call.
//But it is safe to return here because bump images will be reloaded during initialization later.
return ;
}
// can't assert; we destroyGL and restoreGL a lot during *first* startup, which populates this list already, THEN we explicitly init the list as part of *normal* startup. Sigh. So clear the list every time before we (re-)add the standard bumpmaps.
//llassert( LLStandardBumpmap::sStandardBumpmapCount == 0 );
clear();
@@ -891,6 +898,11 @@ void LLBumpImageList::destroyGL()
void LLBumpImageList::restoreGL()
{
if(!gTextureList.isInitialized())
{
//safe to return here because bump images will be reloaded during initialization later.
return ;
}
LLStandardBumpmap::restoreGL();
// Images will be recreated as they are needed.
}

View File

@@ -366,10 +366,8 @@ void LLVolumeImplFlexible::doFlexibleUpdate()
{
LLVolume* volume = mVO->getVolume();
LLPath *path = &volume->getPath();
if ((mSimulateRes == 0 || !mInitialized)) // if its uninitialized but not visible, what then? - Nyx
if ((mSimulateRes == 0 || !mInitialized) && mVO->mDrawable->isVisible())
{
//if(mInitialized && !mVO->mDrawable->isVisible())
// return; //avoiding the assert below...
mVO->markForUpdate(TRUE);
if (!doIdleUpdate(gAgent, *LLWorld::getInstance(), 0.0))
{
@@ -377,7 +375,11 @@ void LLVolumeImplFlexible::doFlexibleUpdate()
}
}
llassert_always(mInitialized);
if(!mInitialized)
{
//the object is not visible
return ;
}
S32 num_sections = 1 << mSimulateRes;

View File

@@ -1385,6 +1385,11 @@ BOOL LLPanelAvatar::postBuild(void)
childSetVisible("csr_btn", FALSE);
childSetEnabled("csr_btn", FALSE);
//This text never changes. We simply toggle visibility.
childSetVisible("online_yes", FALSE);
childSetColor("online_yes",LLColor4::green);
childSetValue("online_yes","Currently Online");
return TRUE;
}
@@ -1443,12 +1448,7 @@ void LLPanelAvatar::setOnlineStatus(EOnlineStatus online_status)
online_status = ONLINE_STATUS_YES;
}
if(online_status == ONLINE_STATUS_YES)
{
mPanelSecondLife->childSetVisible("online_yes", TRUE);
mPanelSecondLife->childSetColor("online_yes",LLColor4::green);
mPanelSecondLife->childSetValue("online_yes","Currently Online");
}
mPanelSecondLife->childSetVisible("online_yes", online_status == ONLINE_STATUS_YES);
// Since setOnlineStatus gets called after setAvatarID
// need to make sure that "Offer Teleport" doesn't get set

View File

@@ -87,13 +87,16 @@ LLViewerTextureList::LLViewerTextureList()
: mForceResetTextureStats(FALSE),
mUpdateStats(FALSE),
mMaxResidentTexMemInMegaBytes(0),
mMaxTotalTextureMemInMegaBytes(0)
mMaxTotalTextureMemInMegaBytes(0),
mInitialized(FALSE)
{
}
void LLViewerTextureList::init()
{
mInitialized = TRUE ;
sNumImages = 0;
mUpdateStats = TRUE;
mMaxResidentTexMemInMegaBytes = 0;
mMaxTotalTextureMemInMegaBytes = 0 ;
if (gNoRender)
@@ -102,8 +105,6 @@ void LLViewerTextureList::init()
return;
}
mUpdateStats = TRUE;
// Update how much texture RAM we're allowed to use.
updateMaxResidentTexMem(0); // 0 = use current
@@ -115,6 +116,10 @@ void LLViewerTextureList::doPreloadImages()
{
LL_DEBUGS("ViewerImages") << "Preloading images..." << LL_ENDL;
llassert_always(mInitialized) ;
llassert_always(mImageList.empty()) ;
llassert_always(mUUIDMap.empty()) ;
// Set the "missing asset" image
LLViewerFetchedTexture::sMissingAssetImagep = LLViewerTextureManager::getFetchedTextureFromFile("missing_asset.tga", MIPMAP_NO, LLViewerFetchedTexture::BOOST_UI);
@@ -286,6 +291,8 @@ void LLViewerTextureList::shutdown()
mUUIDMap.clear();
mImageList.clear();
mInitialized = FALSE ; //prevent loading textures again.
}
void LLViewerTextureList::dump()
@@ -312,6 +319,7 @@ void LLViewerTextureList::destroyGL(BOOL save_state)
void LLViewerTextureList::restoreGL()
{
llassert_always(mInitialized) ;
LLImageGL::restoreGL();
}
@@ -332,6 +340,11 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromFile(const std::string&
LLGLenum primary_format,
const LLUUID& force_id)
{
if(!mInitialized)
{
return NULL ;
}
std::string full_path = gDirUtilp->findSkinnedFilename("textures", filename);
if (full_path.empty())
{
@@ -352,6 +365,11 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromUrl(const std::string&
LLGLenum primary_format,
const LLUUID& force_id)
{
if(!mInitialized)
{
return NULL ;
}
if (gNoRender)
{
// Never mind that this ignores image_set_id;
@@ -418,6 +436,11 @@ LLViewerFetchedTexture* LLViewerTextureList::getImage(const LLUUID &image_id,
LLGLenum primary_format,
LLHost request_from_host)
{
if(!mInitialized)
{
return NULL ;
}
// Return the image with ID image_id
// If the image is not found, creates new image and
// enqueues a request for transmission
@@ -846,7 +869,7 @@ F32 LLViewerTextureList::updateImagesFetchTextures(F32 max_time)
for (entries_list_t::iterator iter3 = entries.begin();
iter3 != entries.end(); )
{
LLPointer<LLViewerFetchedTexture> imagep = *iter3++;
LLViewerFetchedTexture* imagep = *iter3++;
bool fetching = imagep->updateFetch();
if (fetching)

View File

@@ -90,6 +90,7 @@ public:
void dump();
void destroyGL(BOOL save_state = TRUE);
void restoreGL();
BOOL isInitialized() const {return mInitialized;}
LLViewerFetchedTexture *findImage(const LLUUID &image_id);
@@ -196,6 +197,7 @@ private:
// simply holds on to LLViewerFetchedTexture references to stop them from being purged too soon
std::set<LLPointer<LLViewerFetchedTexture> > mImagePreloads;
BOOL mInitialized ;
BOOL mUpdateStats;
S32 mMaxResidentTexMemInMegaBytes;
S32 mMaxTotalTextureMemInMegaBytes;

View File

@@ -1560,6 +1560,7 @@ LLViewerWindow::LLViewerWindow(
gSavedSettings.setBOOL("RenderVBOEnable", FALSE);
}
LLVertexBuffer::initClass(gSavedSettings.getBOOL("RenderVBOEnable"), gSavedSettings.getBOOL("RenderVBOMappingDisable"));
LL_INFOS("RenderInit") << "LLVertexBuffer initialization done." << LL_ENDL ;
if (LLFeatureManager::getInstance()->isSafe()
|| (gSavedSettings.getS32("LastFeatureVersion") != LLFeatureManager::getInstance()->getVersion())

View File

@@ -379,8 +379,7 @@ Returns the rotation of detected object number (returns &lt;0,0,0,1&gt; if numbe
</string>
<string name="LSLTipText_llDetectedGroup">
integer llDetectedGroup(integer number)
Returns an integer that is a boolean representing if the detected object or avatar is in the same group
that the prim containing the script is set to
Returns TRUE if detected object is part of same group as owner
</string>
<string name="LSLTipText_llDetectedLinkNumber">
integer llDetectedLinkNumber(integer number)
@@ -1656,7 +1655,8 @@ Returns the value for header for request_id
</string>
<string name="LSLTipText_llGetPrimMediaParams">
list llGetPrimMediaParams(integer face, list params)
Returns a list of values in the order requested.
Returns the media params for a particular face on an object, given the desired list of names, in the order requested.
(Returns an empty list if no media exists on the face.)
</string>
<string name="LSLTipText_llClearPrimMedia">
integer llClearPrimMedia(integer face)
@@ -1667,12 +1667,13 @@ Returns the value for header for request_id
Set primitive parameters for linknumber based on rules with no built-in script sleep.
</string>
<string name="LSLTipText_llGetLinkPrimitiveParams">
list llGetLinkPrimitiveParams(integer link, list params)
Returns the list of primitive attributes requested in the params list for link.
list llGetLinkPrimitiveParams(integer linknumber,list rules)
Get primitive parameters for linknumber based on rules.
</string>
<string name="LSLTipText_llLinkParticleSystem">
list llLinkParticleSystem(integer link, list rules)
A particle system defined by a list of rules is set for the prim(s) link.
list llLinkParticleSystem(integer linknumber, list rules)
Creates a particle system based on rules. Empty list removes particle system from object.
List format is [ rule1, data1, rule2, data2 . . . rulen, datan ].
</string>
<string name="LSLTipText_llSetLinkTextureAnim">
llSetLinkTextureAnim(integer link, integer mode, integer face, integer sizex, integer sizey, float start, float length, float rate)
@@ -1698,6 +1699,14 @@ Returns the value for header for request_id
key llRequestDisplayName(key id)
Requests name of an avatar. When data is available the dataserver event will be raised.
</string>
<string name="LSLTipText_llRegionSayTo">
llRegionSayTo(key target, integer channel, string msg)
Sends msg on channel (not DEBUG_CHANNEL) directly to prim or avatar target anywhere within the region
</string>
<string name="LSLTipText_llGetEnv">
string llGetEnv(string name)
Returns a string with the requested data about the region
</string>
</strings>