Merge with FS tip.
commit
9d0d42c22b
1
.hgtags
1
.hgtags
|
|
@ -561,3 +561,4 @@ b41e1e7c7876f7656c505f552b5888b4e478f92b 5.0.0-release
|
|||
c9ce2295012995e3cf5c57bcffcb4870b94c649f 5.0.1-release
|
||||
cea1632c002c065985ebea15eeeb4aac90f50545 5.0.2-release
|
||||
02c24e9f4f7d8aa0de75f27817dda098582f4936 5.0.3-release
|
||||
022709ef76a331cac1ba6ef1a6da8a5e9ef63f5a 5.0.4-release
|
||||
|
|
|
|||
|
|
@ -11,11 +11,7 @@ Make sure you're not building from a Visual Studio command prompt, or parts of t
|
|||
chain might accidentally pick up a 32 bit compiler, resulting in x86<>x64 mismatch.
|
||||
|
||||
Configure/build is nearly the same as building a 32 bit version.
|
||||
autobuild -m64 configure -c ReleaseFS -- --chan <channel> --package -DFS_UPGRADECODES='<MSI_UPGRADE_CODE>,<EXE_UPGRADE_CODE>'
|
||||
autobuild -m64 configure -c ReleaseFS -- --chan <channel> --package
|
||||
autobuild -m64 build -c ReleaseFS --no-configure
|
||||
|
||||
The resulting installer/exe gets created in build-vc120_x64/newview/Release
|
||||
|
||||
GUIDs for the installer can be generated by either GuidGen, or a service like https://www.guidgenerator.com/
|
||||
make sure MSI_UPGRADE_CODE and EXE_UPGRADE_CODE are different.
|
||||
|
||||
|
|
|
|||
|
|
@ -1275,11 +1275,11 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>c79d090128279a73822ad894cb3448f6</string>
|
||||
<string>94fc457c46e1fb94b31251bd4747d10f</string>
|
||||
<key>hash_algorithm</key>
|
||||
<string>md5</string>
|
||||
<key>url</key>
|
||||
<string>http://downloads.phoenixviewer.com/glod-1.0pre4.201505182056-r82-darwin-201505182056-r82.tar.bz2</string>
|
||||
<string>http://downloads.phoenixviewer.com/glod-1.0pre3.171101143-darwin64-171101143.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>darwin</string>
|
||||
|
|
@ -1289,9 +1289,11 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>017ef34ddf14293099a90c6eaa3615ca</string>
|
||||
<string>f62e7cff14feb646babaa19b7ea14ed3</string>
|
||||
<key>hash_algorithm</key>
|
||||
<string>md5</string>
|
||||
<key>url</key>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/1626/3627/glod-1.0pre3.501614-darwin64-501614.tar.bz2</string>
|
||||
<string>http://downloads.phoenixviewer.com/glod-1.0pre3.201704302344-linux-201704302344.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>darwin64</string>
|
||||
|
|
@ -1301,11 +1303,11 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>58113bcbbacbaeb2d278f745867ae6f0</string>
|
||||
<string>e3659aa7b670a8fbdfb1b820254abb44</string>
|
||||
<key>hash_algorithm</key>
|
||||
<string>md5</string>
|
||||
<key>url</key>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/p64_3p-glod/rev/314201/arch/Linux/installer/glod-1.0pre4.314201-linux-314201.tar.bz2</string>
|
||||
<string>http://downloads.phoenixviewer.com/glod-1.0pre3.201703081158-windows-201703081158.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>linux</string>
|
||||
|
|
@ -1315,9 +1317,9 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>30a8b171ddc22acdc01488a4611b8abf</string>
|
||||
<string>fea16abf8c2b7f38fc33a2142bfbfe18</string>
|
||||
<key>url</key>
|
||||
<string>http://downloads.phoenixviewer.com/glod-1.0pre4.201505150221-r81-linux-x64-201505150221-r81.tar.bz2</string>
|
||||
<string>http://downloads.phoenixviewer.com/glod-1.0pre3.201704302331-linux64-201704302331.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>linux64</string>
|
||||
|
|
|
|||
|
|
@ -1577,7 +1577,16 @@ void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
|
|||
}
|
||||
alpha_data = new U8[width * height];
|
||||
mAlphaCache[cache_index] = alpha_data;
|
||||
glReadPixels(x, y, width, height, GL_ALPHA, GL_UNSIGNED_BYTE, alpha_data);
|
||||
// <FS:Ansariel> Format GL_ALPHA is invalid for glReadPixels
|
||||
//glReadPixels(x, y, width, height, GL_ALPHA, GL_UNSIGNED_BYTE, alpha_data);
|
||||
U8* alpha_buffer = new U8[width * height * 4];
|
||||
glReadPixels(x, y, width, height, GL_RGBA, GL_UNSIGNED_BYTE, alpha_buffer);
|
||||
for (S32 i = 0; i < width * height; ++i)
|
||||
{
|
||||
alpha_data[i] = alpha_buffer[i * 4 + 3];
|
||||
}
|
||||
delete[] alpha_buffer;
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
|
||||
getTexLayerSet()->getAvatarAppearance()->dirtyMesh();
|
||||
|
|
|
|||
|
|
@ -841,6 +841,28 @@ void LLAvatarNameCache::insert(const LLUUID& agent_id, const LLAvatarName& av_na
|
|||
sCache[agent_id] = av_name;
|
||||
}
|
||||
|
||||
LLUUID LLAvatarNameCache::findIdByName(const std::string& name)
|
||||
{
|
||||
std::map<LLUUID, LLAvatarName>::iterator it;
|
||||
std::map<LLUUID, LLAvatarName>::iterator end = sCache.end();
|
||||
for (it = sCache.begin(); it != end; ++it)
|
||||
{
|
||||
if (it->second.getUserName() == name)
|
||||
{
|
||||
return it->first;
|
||||
}
|
||||
}
|
||||
|
||||
// Legacy method
|
||||
LLUUID id;
|
||||
if (gCacheName->getUUID(name, id))
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
return LLUUID::null;
|
||||
}
|
||||
|
||||
#if 0
|
||||
F64 LLAvatarNameCache::nameExpirationFromHeaders(LLCore::HttpHeaders *headers)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -90,7 +90,15 @@ namespace LLAvatarNameCache
|
|||
|
||||
void erase(const LLUUID& agent_id);
|
||||
|
||||
/// Provide some fallback for agents that return errors.
|
||||
// A way to find agent id by UUID, very slow, also unreliable
|
||||
// since it doesn't request names, just serch exsisting ones
|
||||
// that are likely not in cache.
|
||||
//
|
||||
// Todo: Find a way to remove this.
|
||||
// Curently this method is used for chat history and in some cases notices.
|
||||
LLUUID findIdByName(const std::string& name);
|
||||
|
||||
/// Provide some fallback for agents that return errors.
|
||||
void handleAgentError(const LLUUID& agent_id);
|
||||
|
||||
// Force a re-fetch of the most recent data, but keep the current
|
||||
|
|
|
|||
|
|
@ -546,18 +546,34 @@ void LLExperienceCache::fetchAssociatedExperience(const LLUUID& objectId, const
|
|||
}
|
||||
|
||||
LLCoprocedureManager::instance().enqueueCoprocedure("ExpCache", "Fetch Associated",
|
||||
boost::bind(&LLExperienceCache::fetchAssociatedExperienceCoro, this, _1, objectId, itemId, fn));
|
||||
boost::bind(&LLExperienceCache::fetchAssociatedExperienceCoro, this, _1, objectId, itemId, std::string(), fn));
|
||||
}
|
||||
|
||||
void LLExperienceCache::fetchAssociatedExperienceCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &httpAdapter, LLUUID objectId, LLUUID itemId, ExperienceGetFn_t fn)
|
||||
void LLExperienceCache::fetchAssociatedExperience(const LLUUID& objectId, const LLUUID& itemId, std::string url, ExperienceGetFn_t fn)
|
||||
{
|
||||
if (mCapability.empty())
|
||||
{
|
||||
LL_WARNS("ExperienceCache") << "Capability query method not set." << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
|
||||
LLCoprocedureManager::instance().enqueueCoprocedure("ExpCache", "Fetch Associated",
|
||||
boost::bind(&LLExperienceCache::fetchAssociatedExperienceCoro, this, _1, objectId, itemId, url, fn));
|
||||
}
|
||||
|
||||
void LLExperienceCache::fetchAssociatedExperienceCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &httpAdapter, LLUUID objectId, LLUUID itemId, std::string url, ExperienceGetFn_t fn)
|
||||
{
|
||||
LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest());
|
||||
std::string url = mCapability("GetMetadata");
|
||||
|
||||
if (url.empty())
|
||||
{
|
||||
LL_WARNS("ExperienceCache") << "No Metadata capability." << LL_ENDL;
|
||||
return;
|
||||
url = mCapability("GetMetadata");
|
||||
|
||||
if (url.empty())
|
||||
{
|
||||
LL_WARNS("ExperienceCache") << "No Metadata capability." << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
LLSD fields;
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ public:
|
|||
|
||||
//-------------------------------------------
|
||||
void fetchAssociatedExperience(const LLUUID& objectId, const LLUUID& itemId, ExperienceGetFn_t fn);
|
||||
void fetchAssociatedExperience(const LLUUID& objectId, const LLUUID& itemId, std::string url, ExperienceGetFn_t fn);
|
||||
void findExperienceByName(const std::string text, int page, ExperienceGetFn_t fn);
|
||||
void getGroupExperiences(const LLUUID &groupId, ExperienceGetFn_t fn);
|
||||
|
||||
|
|
@ -148,7 +149,7 @@ private:
|
|||
void requestExperiencesCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &, std::string, RequestQueue_t);
|
||||
void requestExperiences();
|
||||
|
||||
void fetchAssociatedExperienceCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &, LLUUID, LLUUID, ExperienceGetFn_t);
|
||||
void fetchAssociatedExperienceCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &, LLUUID, LLUUID, std::string, ExperienceGetFn_t);
|
||||
void findExperienceByNameCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &, std::string, int, ExperienceGetFn_t);
|
||||
void getGroupExperiencesCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &, LLUUID , ExperienceGetFn_t);
|
||||
void regionExperiencesCoro(LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t &httpAdapter, CapabilityQuery_t regioncaps, bool update, LLSD experiences, ExperienceGetFn_t fn);
|
||||
|
|
|
|||
|
|
@ -618,6 +618,7 @@ char const* const _PREHASH_GroupAccountSummaryRequest = LLMessageStringTable::ge
|
|||
char const* const _PREHASH_GroupVoteHistoryRequest = LLMessageStringTable::getInstance()->getString("GroupVoteHistoryRequest");
|
||||
char const* const _PREHASH_ParamValue = LLMessageStringTable::getInstance()->getString("ParamValue");
|
||||
char const* const _PREHASH_MaxAgents = LLMessageStringTable::getInstance()->getString("MaxAgents");
|
||||
char const* const _PREHASH_HardMaxAgents = LLMessageStringTable::getInstance()->getString("HardMaxAgents");
|
||||
char const* const _PREHASH_CreateNewOutfitAttachments = LLMessageStringTable::getInstance()->getString("CreateNewOutfitAttachments");
|
||||
char const* const _PREHASH_RegionHandle = LLMessageStringTable::getInstance()->getString("RegionHandle");
|
||||
char const* const _PREHASH_TeleportProgress = LLMessageStringTable::getInstance()->getString("TeleportProgress");
|
||||
|
|
|
|||
|
|
@ -618,6 +618,7 @@ extern char const* const _PREHASH_GroupAccountSummaryRequest;
|
|||
extern char const* const _PREHASH_GroupVoteHistoryRequest;
|
||||
extern char const* const _PREHASH_ParamValue;
|
||||
extern char const* const _PREHASH_MaxAgents;
|
||||
extern char const* const _PREHASH_HardMaxAgents;
|
||||
extern char const* const _PREHASH_CreateNewOutfitAttachments;
|
||||
extern char const* const _PREHASH_RegionHandle;
|
||||
extern char const* const _PREHASH_TeleportProgress;
|
||||
|
|
|
|||
|
|
@ -180,10 +180,7 @@ LLPrimitive::~LLPrimitive()
|
|||
{
|
||||
clearTextureList();
|
||||
// Cleanup handled by volume manager
|
||||
|
||||
// <FS:ND/> During shutdown sVolumeManager can be 0
|
||||
// if (mVolumep)
|
||||
if ( mVolumep && sVolumeManager )
|
||||
if (mVolumep && sVolumeManager)
|
||||
{
|
||||
sVolumeManager->unrefVolume(mVolumep);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -257,9 +257,14 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons
|
|||
const LLFontGlyphInfo* next_glyph = NULL;
|
||||
|
||||
const S32 GLYPH_BATCH_SIZE = 30;
|
||||
LLVector3 vertices[GLYPH_BATCH_SIZE * 4];
|
||||
LLVector2 uvs[GLYPH_BATCH_SIZE * 4];
|
||||
LLColor4U colors[GLYPH_BATCH_SIZE * 4];
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//LLVector3 vertices[GLYPH_BATCH_SIZE * 4];
|
||||
//LLVector2 uvs[GLYPH_BATCH_SIZE * 4];
|
||||
//LLColor4U colors[GLYPH_BATCH_SIZE * 4];
|
||||
LLVector3 vertices[GLYPH_BATCH_SIZE * 6];
|
||||
LLVector2 uvs[GLYPH_BATCH_SIZE * 6];
|
||||
LLColor4U colors[GLYPH_BATCH_SIZE * 6];
|
||||
// </FS:Ansariel>
|
||||
|
||||
LLColor4U text_color(color);
|
||||
|
||||
|
|
@ -288,11 +293,18 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons
|
|||
// otherwise the queued glyphs will be taken from wrong textures.
|
||||
if (glyph_count > 0)
|
||||
{
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//gGL.begin(LLRender::QUADS);
|
||||
//{
|
||||
// gGL.vertexBatchPreTransformed(vertices, uvs, colors, glyph_count * 4);
|
||||
//}
|
||||
//gGL.end();
|
||||
gGL.begin(LLRender::TRIANGLES);
|
||||
{
|
||||
gGL.vertexBatchPreTransformed(vertices, uvs, colors, glyph_count * 4);
|
||||
gGL.vertexBatchPreTransformed(vertices, uvs, colors, glyph_count * 6);
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
glyph_count = 0;
|
||||
}
|
||||
|
||||
|
|
@ -321,11 +333,18 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons
|
|||
|
||||
if (glyph_count >= GLYPH_BATCH_SIZE)
|
||||
{
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//gGL.begin(LLRender::QUADS);
|
||||
//{
|
||||
// gGL.vertexBatchPreTransformed(vertices, uvs, colors, glyph_count * 4);
|
||||
//}
|
||||
//gGL.end();
|
||||
gGL.begin(LLRender::TRIANGLES);
|
||||
{
|
||||
gGL.vertexBatchPreTransformed(vertices, uvs, colors, glyph_count * 4);
|
||||
gGL.vertexBatchPreTransformed(vertices, uvs, colors, glyph_count * 6);
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
|
||||
glyph_count = 0;
|
||||
}
|
||||
|
|
@ -355,11 +374,18 @@ S32 LLFontGL::render(const LLWString &wstr, S32 begin_offset, F32 x, F32 y, cons
|
|||
cur_render_y = cur_y;
|
||||
}
|
||||
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//gGL.begin(LLRender::QUADS);
|
||||
//{
|
||||
// gGL.vertexBatchPreTransformed(vertices, uvs, colors, glyph_count * 4);
|
||||
//}
|
||||
//gGL.end();
|
||||
gGL.begin(LLRender::TRIANGLES);
|
||||
{
|
||||
gGL.vertexBatchPreTransformed(vertices, uvs, colors, glyph_count * 4);
|
||||
gGL.vertexBatchPreTransformed(vertices, uvs, colors, glyph_count * 6);
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
|
||||
|
||||
if (right_x)
|
||||
|
|
@ -1184,7 +1210,31 @@ LLFontGL &LLFontGL::operator=(const LLFontGL &source)
|
|||
return *this;
|
||||
}
|
||||
|
||||
void LLFontGL::renderQuad(LLVector3* vertex_out, LLVector2* uv_out, LLColor4U* colors_out, const LLRectf& screen_rect, const LLRectf& uv_rect, const LLColor4U& color, F32 slant_amt) const
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//void LLFontGL::renderQuad(LLVector3* vertex_out, LLVector2* uv_out, LLColor4U* colors_out, const LLRectf& screen_rect, const LLRectf& uv_rect, const LLColor4U& color, F32 slant_amt) const
|
||||
//{
|
||||
// S32 index = 0;
|
||||
//
|
||||
// vertex_out[index] = LLVector3(screen_rect.mRight, screen_rect.mTop, 0.f);
|
||||
// uv_out[index] = LLVector2(uv_rect.mRight, uv_rect.mTop);
|
||||
// colors_out[index] = color;
|
||||
// index++;
|
||||
//
|
||||
// vertex_out[index] = LLVector3(screen_rect.mLeft, screen_rect.mTop, 0.f);
|
||||
// uv_out[index] = LLVector2(uv_rect.mLeft, uv_rect.mTop);
|
||||
// colors_out[index] = color;
|
||||
// index++;
|
||||
//
|
||||
// vertex_out[index] = LLVector3(screen_rect.mLeft, screen_rect.mBottom, 0.f);
|
||||
// uv_out[index] = LLVector2(uv_rect.mLeft, uv_rect.mBottom);
|
||||
// colors_out[index] = color;
|
||||
// index++;
|
||||
//
|
||||
// vertex_out[index] = LLVector3(screen_rect.mRight, screen_rect.mBottom, 0.f);
|
||||
// uv_out[index] = LLVector2(uv_rect.mRight, uv_rect.mBottom);
|
||||
// colors_out[index] = color;
|
||||
//}
|
||||
void LLFontGL::renderTriangle(LLVector3* vertex_out, LLVector2* uv_out, LLColor4U* colors_out, const LLRectf& screen_rect, const LLRectf& uv_rect, const LLColor4U& color, F32 slant_amt) const
|
||||
{
|
||||
S32 index = 0;
|
||||
|
||||
|
|
@ -1203,10 +1253,22 @@ void LLFontGL::renderQuad(LLVector3* vertex_out, LLVector2* uv_out, LLColor4U* c
|
|||
colors_out[index] = color;
|
||||
index++;
|
||||
|
||||
|
||||
vertex_out[index] = LLVector3(screen_rect.mRight, screen_rect.mTop, 0.f);
|
||||
uv_out[index] = LLVector2(uv_rect.mRight, uv_rect.mTop);
|
||||
colors_out[index] = color;
|
||||
index++;
|
||||
|
||||
vertex_out[index] = LLVector3(screen_rect.mLeft, screen_rect.mBottom, 0.f);
|
||||
uv_out[index] = LLVector2(uv_rect.mLeft, uv_rect.mBottom);
|
||||
colors_out[index] = color;
|
||||
index++;
|
||||
|
||||
vertex_out[index] = LLVector3(screen_rect.mRight, screen_rect.mBottom, 0.f);
|
||||
uv_out[index] = LLVector2(uv_rect.mRight, uv_rect.mBottom);
|
||||
colors_out[index] = color;
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
void LLFontGL::drawGlyph(S32& glyph_count, LLVector3* vertex_out, LLVector2* uv_out, LLColor4U* colors_out, const LLRectf& screen_rect, const LLRectf& uv_rect, const LLColor4U& color, U8 style, ShadowType shadow, F32 drop_shadow_strength) const
|
||||
{
|
||||
|
|
@ -1222,7 +1284,10 @@ void LLFontGL::drawGlyph(S32& glyph_count, LLVector3* vertex_out, LLVector2* uv_
|
|||
LLRectf screen_rect_offset = screen_rect;
|
||||
|
||||
screen_rect_offset.translate((F32)(pass * BOLD_OFFSET), 0.f);
|
||||
renderQuad(&vertex_out[glyph_count * 4], &uv_out[glyph_count * 4], &colors_out[glyph_count * 4], screen_rect_offset, uv_rect, color, slant_offset);
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//renderQuad(&vertex_out[glyph_count * 4], &uv_out[glyph_count * 4], &colors_out[glyph_count * 4], screen_rect_offset, uv_rect, color, slant_offset);
|
||||
renderTriangle(&vertex_out[glyph_count * 6], &uv_out[glyph_count * 6], &colors_out[glyph_count * 6], screen_rect_offset, uv_rect, color, slant_offset);
|
||||
// </FS:Ansariel>
|
||||
glyph_count++;
|
||||
}
|
||||
}
|
||||
|
|
@ -1253,10 +1318,16 @@ void LLFontGL::drawGlyph(S32& glyph_count, LLVector3* vertex_out, LLVector2* uv_
|
|||
break;
|
||||
}
|
||||
|
||||
renderQuad(&vertex_out[glyph_count * 4], &uv_out[glyph_count * 4], &colors_out[glyph_count * 4], screen_rect_offset, uv_rect, shadow_color, slant_offset);
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//renderQuad(&vertex_out[glyph_count * 4], &uv_out[glyph_count * 4], &colors_out[glyph_count * 4], screen_rect_offset, uv_rect, shadow_color, slant_offset);
|
||||
renderTriangle(&vertex_out[glyph_count * 6], &uv_out[glyph_count * 6], &colors_out[glyph_count * 6], screen_rect_offset, uv_rect, shadow_color, slant_offset);
|
||||
// </FS:Ansariel>
|
||||
glyph_count++;
|
||||
}
|
||||
renderQuad(&vertex_out[glyph_count * 4], &uv_out[glyph_count * 4], &colors_out[glyph_count * 4], screen_rect, uv_rect, color, slant_offset);
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//renderQuad(&vertex_out[glyph_count * 4], &uv_out[glyph_count * 4], &colors_out[glyph_count * 4], screen_rect, uv_rect, color, slant_offset);
|
||||
renderTriangle(&vertex_out[glyph_count * 6], &uv_out[glyph_count * 6], &colors_out[glyph_count * 6], screen_rect, uv_rect, color, slant_offset);
|
||||
// </FS:Ansariel>
|
||||
glyph_count++;
|
||||
}
|
||||
else if (shadow == DROP_SHADOW)
|
||||
|
|
@ -1265,14 +1336,22 @@ void LLFontGL::drawGlyph(S32& glyph_count, LLVector3* vertex_out, LLVector2* uv_
|
|||
shadow_color.mV[VALPHA] = U8(color.mV[VALPHA] * drop_shadow_strength);
|
||||
LLRectf screen_rect_shadow = screen_rect;
|
||||
screen_rect_shadow.translate(1.f, -1.f);
|
||||
renderQuad(&vertex_out[glyph_count * 4], &uv_out[glyph_count * 4], &colors_out[glyph_count * 4], screen_rect_shadow, uv_rect, shadow_color, slant_offset);
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//renderQuad(&vertex_out[glyph_count * 4], &uv_out[glyph_count * 4], &colors_out[glyph_count * 4], screen_rect_shadow, uv_rect, shadow_color, slant_offset);
|
||||
//glyph_count++;
|
||||
//renderQuad(&vertex_out[glyph_count * 4], &uv_out[glyph_count * 4], &colors_out[glyph_count * 4], screen_rect, uv_rect, color, slant_offset);
|
||||
renderTriangle(&vertex_out[glyph_count * 6], &uv_out[glyph_count * 6], &colors_out[glyph_count * 6], screen_rect_shadow, uv_rect, shadow_color, slant_offset);
|
||||
glyph_count++;
|
||||
renderQuad(&vertex_out[glyph_count * 4], &uv_out[glyph_count * 4], &colors_out[glyph_count * 4], screen_rect, uv_rect, color, slant_offset);
|
||||
renderTriangle(&vertex_out[glyph_count * 6], &uv_out[glyph_count * 6], &colors_out[glyph_count * 6], screen_rect, uv_rect, color, slant_offset);
|
||||
// </FS:Ansariel>
|
||||
glyph_count++;
|
||||
}
|
||||
else // normal rendering
|
||||
{
|
||||
renderQuad(&vertex_out[glyph_count * 4], &uv_out[glyph_count * 4], &colors_out[glyph_count * 4], screen_rect, uv_rect, color, slant_offset);
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//renderQuad(&vertex_out[glyph_count * 4], &uv_out[glyph_count * 4], &colors_out[glyph_count * 4], screen_rect, uv_rect, color, slant_offset);
|
||||
renderTriangle(&vertex_out[glyph_count * 6], &uv_out[glyph_count * 6], &colors_out[glyph_count * 6], screen_rect, uv_rect, color, slant_offset);
|
||||
// </FS:Ansariel>
|
||||
glyph_count++;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -225,7 +225,10 @@ private:
|
|||
LLFontDescriptor mFontDescriptor;
|
||||
LLPointer<LLFontFreetype> mFontFreetype;
|
||||
|
||||
void renderQuad(LLVector3* vertex_out, LLVector2* uv_out, LLColor4U* colors_out, const LLRectf& screen_rect, const LLRectf& uv_rect, const LLColor4U& color, F32 slant_amt) const;
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//void renderQuad(LLVector3* vertex_out, LLVector2* uv_out, LLColor4U* colors_out, const LLRectf& screen_rect, const LLRectf& uv_rect, const LLColor4U& color, F32 slant_amt) const;
|
||||
void renderTriangle(LLVector3* vertex_out, LLVector2* uv_out, LLColor4U* colors_out, const LLRectf& screen_rect, const LLRectf& uv_rect, const LLColor4U& color, F32 slant_amt) const;
|
||||
// </FS:Ansariel>
|
||||
void drawGlyph(S32& glyph_count, LLVector3* vertex_out, LLVector2* uv_out, LLColor4U* colors_out, const LLRectf& screen_rect, const LLRectf& uv_rect, const LLColor4U& color, U8 style, ShadowType shadow, F32 drop_shadow_fade) const;
|
||||
|
||||
// Registry holds all instantiated fonts.
|
||||
|
|
|
|||
|
|
@ -988,8 +988,10 @@ void LLGLManager::initExtensions()
|
|||
mHasSync = ExtensionExists("GL_ARB_sync", gGLHExts.mSysExts);
|
||||
mHasMapBufferRange = ExtensionExists("GL_ARB_map_buffer_range", gGLHExts.mSysExts);
|
||||
mHasFlushBufferRange = ExtensionExists("GL_APPLE_flush_buffer_range", gGLHExts.mSysExts);
|
||||
//mHasDepthClamp = ExtensionExists("GL_ARB_depth_clamp", gGLHExts.mSysExts) || ExtensionExists("GL_NV_depth_clamp", gGLHExts.mSysExts);
|
||||
mHasDepthClamp = FALSE;
|
||||
// <FS> Fix void and region water flickr by Drake Arconis (Alchemy viewer)
|
||||
mHasDepthClamp = ExtensionExists("GL_ARB_depth_clamp", gGLHExts.mSysExts) || ExtensionExists("GL_NV_depth_clamp", gGLHExts.mSysExts);
|
||||
//mHasDepthClamp = FALSE;
|
||||
// </FS>
|
||||
// mask out FBO support when packed_depth_stencil isn't there 'cause we need it for LLRenderTarget -Brad
|
||||
#ifdef GL_ARB_framebuffer_object
|
||||
mHasFramebufferObject = ExtensionExists("GL_ARB_framebuffer_object", gGLHExts.mSysExts);
|
||||
|
|
|
|||
|
|
@ -813,6 +813,12 @@ extern PFNGLGETDEBUGMESSAGELOGARBPROC glGetDebugMessageLogARB;
|
|||
// Note that they also must not be called on 10.3.9. This should be taken care of by a runtime check for the existence of the GL extension.
|
||||
#include <AvailabilityMacros.h>
|
||||
|
||||
// <FS:ND> Workaround to get a OSX version to compile (until someone with a Mac makes including gl3.h work)
|
||||
#ifndef GL_TEXTURE_RECTANGLE
|
||||
#define GL_TEXTURE_RECTANGLE GL_TEXTURE_RECTANGLE_ARB
|
||||
#endif
|
||||
// </FS:ND>
|
||||
|
||||
//GL_EXT_blend_func_separate
|
||||
extern void glBlendFuncSeparateEXT(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) ;
|
||||
|
||||
|
|
|
|||
|
|
@ -352,6 +352,11 @@ void LLGLSLShader::unloadInternal()
|
|||
for (GLsizei i = 0; i < count; i++)
|
||||
{
|
||||
glDetachObjectARB(mProgramObject, obj[i]);
|
||||
// <FS:Ansariel> OpenGL error: glDeleteObjectARB - GL_INVALID_VALUE
|
||||
#if !LL_DARWIN
|
||||
if (glIsProgramARB(obj[i]))
|
||||
#endif
|
||||
// </FS:Ansariel>
|
||||
glDeleteObjectARB(obj[i]);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -391,7 +391,10 @@ void LLPostProcess::doEffects(void)
|
|||
void LLPostProcess::copyFrameBuffer(U32 & texture, unsigned int width, unsigned int height)
|
||||
{
|
||||
gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_RECT_TEXTURE, texture);
|
||||
glCopyTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGBA, 0, 0, width, height, 0);
|
||||
// <FS:Ansariel> Replace GL_TEXTURE_RECTANGLE_ARB with GL_TEXTURE_RECTANGLE
|
||||
//glCopyTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGBA, 0, 0, width, height, 0);
|
||||
glCopyTexImage2D(GL_TEXTURE_RECTANGLE, 0, GL_RGBA, 0, 0, width, height, 0);
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
|
||||
void LLPostProcess::drawOrthoQuad(unsigned int width, unsigned int height, QuadType type)
|
||||
|
|
@ -503,7 +506,10 @@ void LLPostProcess::createTexture(LLPointer<LLImageGL>& texture, unsigned int wi
|
|||
if(texture->createGLTexture())
|
||||
{
|
||||
gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_RECT_TEXTURE, texture->getTexName());
|
||||
glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, 4, width, height, 0,
|
||||
// <FS:Ansariel> Replace GL_TEXTURE_RECTANGLE_ARB with GL_TEXTURE_RECTANGLE
|
||||
//glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, 4, width, height, 0,
|
||||
glTexImage2D(GL_TEXTURE_RECTANGLE, 0, 4, width, height, 0,
|
||||
// </FS:Ansariel>
|
||||
GL_RGBA, GL_UNSIGNED_BYTE, &data[0]);
|
||||
gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR);
|
||||
gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP);
|
||||
|
|
|
|||
|
|
@ -56,7 +56,10 @@ static const U32 LL_NUM_LIGHT_UNITS = 8;
|
|||
static const GLenum sGLTextureType[] =
|
||||
{
|
||||
GL_TEXTURE_2D,
|
||||
GL_TEXTURE_RECTANGLE_ARB,
|
||||
// <FS:Ansariel> Replace GL_TEXTURE_RECTANGLE_ARB with GL_TEXTURE_RECTANGLE
|
||||
//GL_TEXTURE_RECTANGLE_ARB,
|
||||
GL_TEXTURE_RECTANGLE,
|
||||
// </FS:Ansariel>
|
||||
GL_TEXTURE_CUBE_MAP_ARB,
|
||||
GL_TEXTURE_2D_MULTISAMPLE
|
||||
};
|
||||
|
|
@ -1028,7 +1031,7 @@ void LLLightState::setSpotDirection(const LLVector3& direction)
|
|||
LLRender::LLRender()
|
||||
: mDirty(false),
|
||||
mCount(0),
|
||||
mQuadCycle(0),
|
||||
//mQuadCycle(0), // <FS:Ansariel> Remove QUADS rendering mode
|
||||
mMode(LLRender::TRIANGLES),
|
||||
mCurrTextureUnitIndex(0),
|
||||
mMaxAnisotropy(0.f)
|
||||
|
|
@ -1088,11 +1091,14 @@ void LLRender::init()
|
|||
|
||||
llassert_always(mBuffer.isNull()) ;
|
||||
stop_glerror();
|
||||
mBuffer = new LLVertexBuffer(immediate_mask, 0);
|
||||
mBuffer->allocateBuffer(4096, 0, TRUE);
|
||||
mBuffer->getVertexStrider(mVerticesp);
|
||||
mBuffer->getTexCoord0Strider(mTexcoordsp);
|
||||
mBuffer->getColorStrider(mColorsp);
|
||||
// <FS:Ansariel> Reset VB during TP
|
||||
//mBuffer = new LLVertexBuffer(immediate_mask, 0);
|
||||
//mBuffer->allocateBuffer(4096, 0, TRUE);
|
||||
//mBuffer->getVertexStrider(mVerticesp);
|
||||
//mBuffer->getTexCoord0Strider(mTexcoordsp);
|
||||
//mBuffer->getColorStrider(mColorsp);
|
||||
initVB();
|
||||
// </FS:Ansariel>
|
||||
stop_glerror();
|
||||
}
|
||||
|
||||
|
|
@ -1111,9 +1117,29 @@ void LLRender::shutdown()
|
|||
delete mLightState[i];
|
||||
}
|
||||
mLightState.clear();
|
||||
mBuffer = NULL ;
|
||||
// <FS:Ansariel> Reset VB during TP
|
||||
//mBuffer = NULL ;
|
||||
destroyVB();
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
|
||||
// <FS:Ansariel> Reset VB during TP
|
||||
void LLRender::initVB()
|
||||
{
|
||||
mBuffer = new LLVertexBuffer(immediate_mask, 0);
|
||||
mBuffer->allocateBuffer(4096, 0, TRUE);
|
||||
mBuffer->getVertexStrider(mVerticesp);
|
||||
mBuffer->getTexCoord0Strider(mTexcoordsp);
|
||||
mBuffer->getColorStrider(mColorsp);
|
||||
}
|
||||
|
||||
void LLRender::destroyVB()
|
||||
{
|
||||
mBuffer = NULL;
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
|
||||
void LLRender::refreshState(void)
|
||||
{
|
||||
mDirty = true;
|
||||
|
|
@ -1808,12 +1834,14 @@ void LLRender::begin(const GLuint& mode)
|
|||
{
|
||||
if (mode != mMode)
|
||||
{
|
||||
if (mode == LLRender::QUADS)
|
||||
{
|
||||
mQuadCycle = 1;
|
||||
}
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//if (mode == LLRender::QUADS)
|
||||
//{
|
||||
// mQuadCycle = 1;
|
||||
//}
|
||||
// </FS:Ansariel>
|
||||
|
||||
if (mMode == LLRender::QUADS ||
|
||||
if (//mMode == LLRender::QUADS || // <FS:Ansariel> Remove QUADS rendering mode
|
||||
mMode == LLRender::LINES ||
|
||||
mMode == LLRender::TRIANGLES ||
|
||||
mMode == LLRender::POINTS)
|
||||
|
|
@ -1837,7 +1865,7 @@ void LLRender::end()
|
|||
//IMM_ERRS << "GL begin and end called with no vertices specified." << LL_ENDL;
|
||||
}
|
||||
|
||||
if ((mMode != LLRender::QUADS &&
|
||||
if ((//mMode != LLRender::QUADS && // <FS:Ansariel> Remove QUADS rendering mode
|
||||
mMode != LLRender::LINES &&
|
||||
mMode != LLRender::TRIANGLES &&
|
||||
mMode != LLRender::POINTS) ||
|
||||
|
|
@ -1859,14 +1887,16 @@ void LLRender::flush()
|
|||
//store mCount in a local variable to avoid re-entrance (drawArrays may call flush)
|
||||
U32 count = mCount;
|
||||
|
||||
if (mMode == LLRender::QUADS && !sGLCoreProfile)
|
||||
{
|
||||
if (mCount%4 != 0)
|
||||
{
|
||||
count -= (mCount % 4);
|
||||
LL_WARNS() << "Incomplete quad requested." << LL_ENDL;
|
||||
}
|
||||
}
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//if (mMode == LLRender::QUADS && !sGLCoreProfile)
|
||||
//{
|
||||
// if (mCount%4 != 0)
|
||||
// {
|
||||
// count -= (mCount % 4);
|
||||
// LL_WARNS() << "Incomplete quad requested." << LL_ENDL;
|
||||
// }
|
||||
//}
|
||||
// </FS:Ansariel>
|
||||
|
||||
if (mMode == LLRender::TRIANGLES)
|
||||
{
|
||||
|
|
@ -1898,12 +1928,14 @@ void LLRender::flush()
|
|||
mBuffer->flush();
|
||||
mBuffer->setBuffer(immediate_mask);
|
||||
|
||||
if (mMode == LLRender::QUADS && sGLCoreProfile)
|
||||
{
|
||||
mBuffer->drawArrays(LLRender::TRIANGLES, 0, count);
|
||||
mQuadCycle = 1;
|
||||
}
|
||||
else
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//if (mMode == LLRender::QUADS && sGLCoreProfile)
|
||||
//{
|
||||
// mBuffer->drawArrays(LLRender::TRIANGLES, 0, count);
|
||||
// mQuadCycle = 1;
|
||||
//}
|
||||
//else
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
mBuffer->drawArrays(mMode, 0, count);
|
||||
}
|
||||
|
|
@ -1925,7 +1957,8 @@ void LLRender::vertex3f(const GLfloat& x, const GLfloat& y, const GLfloat& z)
|
|||
{
|
||||
case LLRender::POINTS: flush(); break;
|
||||
case LLRender::TRIANGLES: if (mCount%3==0) flush(); break;
|
||||
case LLRender::QUADS: if(mCount%4 == 0) flush(); break;
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//case LLRender::QUADS: if(mCount%4 == 0) flush(); break;
|
||||
case LLRender::LINES: if (mCount%2 == 0) flush(); break;
|
||||
}
|
||||
}
|
||||
|
|
@ -1946,24 +1979,26 @@ void LLRender::vertex3f(const GLfloat& x, const GLfloat& y, const GLfloat& z)
|
|||
mVerticesp[mCount] = vert;
|
||||
}
|
||||
|
||||
if (mMode == LLRender::QUADS && LLRender::sGLCoreProfile)
|
||||
{
|
||||
mQuadCycle++;
|
||||
if (mQuadCycle == 4)
|
||||
{ //copy two vertices so fourth quad element will add a triangle
|
||||
mQuadCycle = 0;
|
||||
|
||||
mCount++;
|
||||
mVerticesp[mCount] = mVerticesp[mCount-3];
|
||||
mColorsp[mCount] = mColorsp[mCount-3];
|
||||
mTexcoordsp[mCount] = mTexcoordsp[mCount-3];
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//if (mMode == LLRender::QUADS && LLRender::sGLCoreProfile)
|
||||
//{
|
||||
// mQuadCycle++;
|
||||
// if (mQuadCycle == 4)
|
||||
// { //copy two vertices so fourth quad element will add a triangle
|
||||
// mQuadCycle = 0;
|
||||
//
|
||||
// mCount++;
|
||||
// mVerticesp[mCount] = mVerticesp[mCount-3];
|
||||
// mColorsp[mCount] = mColorsp[mCount-3];
|
||||
// mTexcoordsp[mCount] = mTexcoordsp[mCount-3];
|
||||
|
||||
mCount++;
|
||||
mVerticesp[mCount] = mVerticesp[mCount-2];
|
||||
mColorsp[mCount] = mColorsp[mCount-2];
|
||||
mTexcoordsp[mCount] = mTexcoordsp[mCount-2];
|
||||
}
|
||||
}
|
||||
// mCount++;
|
||||
// mVerticesp[mCount] = mVerticesp[mCount-2];
|
||||
// mColorsp[mCount] = mColorsp[mCount-2];
|
||||
// mTexcoordsp[mCount] = mTexcoordsp[mCount-2];
|
||||
// }
|
||||
//}
|
||||
// </FS:Ansariel>
|
||||
|
||||
mCount++;
|
||||
mVerticesp[mCount] = mVerticesp[mCount-1];
|
||||
|
|
@ -1979,41 +2014,43 @@ void LLRender::vertexBatchPreTransformed(LLVector3* verts, S32 vert_count)
|
|||
return;
|
||||
}
|
||||
|
||||
if (sGLCoreProfile && mMode == LLRender::QUADS)
|
||||
{ //quads are deprecated, convert to triangle list
|
||||
S32 i = 0;
|
||||
|
||||
while (i < vert_count)
|
||||
{
|
||||
//read first three
|
||||
mVerticesp[mCount++] = verts[i++];
|
||||
mTexcoordsp[mCount] = mTexcoordsp[mCount-1];
|
||||
mColorsp[mCount] = mColorsp[mCount-1];
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//if (sGLCoreProfile && mMode == LLRender::QUADS)
|
||||
//{ //quads are deprecated, convert to triangle list
|
||||
// S32 i = 0;
|
||||
//
|
||||
// while (i < vert_count)
|
||||
// {
|
||||
// //read first three
|
||||
// mVerticesp[mCount++] = verts[i++];
|
||||
// mTexcoordsp[mCount] = mTexcoordsp[mCount-1];
|
||||
// mColorsp[mCount] = mColorsp[mCount-1];
|
||||
|
||||
mVerticesp[mCount++] = verts[i++];
|
||||
mTexcoordsp[mCount] = mTexcoordsp[mCount-1];
|
||||
mColorsp[mCount] = mColorsp[mCount-1];
|
||||
// mVerticesp[mCount++] = verts[i++];
|
||||
// mTexcoordsp[mCount] = mTexcoordsp[mCount-1];
|
||||
// mColorsp[mCount] = mColorsp[mCount-1];
|
||||
|
||||
mVerticesp[mCount++] = verts[i++];
|
||||
mTexcoordsp[mCount] = mTexcoordsp[mCount-1];
|
||||
mColorsp[mCount] = mColorsp[mCount-1];
|
||||
// mVerticesp[mCount++] = verts[i++];
|
||||
// mTexcoordsp[mCount] = mTexcoordsp[mCount-1];
|
||||
// mColorsp[mCount] = mColorsp[mCount-1];
|
||||
|
||||
//copy two
|
||||
mVerticesp[mCount++] = verts[i-3];
|
||||
mTexcoordsp[mCount] = mTexcoordsp[mCount-1];
|
||||
mColorsp[mCount] = mColorsp[mCount-1];
|
||||
// //copy two
|
||||
// mVerticesp[mCount++] = verts[i-3];
|
||||
// mTexcoordsp[mCount] = mTexcoordsp[mCount-1];
|
||||
// mColorsp[mCount] = mColorsp[mCount-1];
|
||||
|
||||
mVerticesp[mCount++] = verts[i-1];
|
||||
mTexcoordsp[mCount] = mTexcoordsp[mCount-1];
|
||||
mColorsp[mCount] = mColorsp[mCount-1];
|
||||
|
||||
//copy last one
|
||||
mVerticesp[mCount++] = verts[i++];
|
||||
mTexcoordsp[mCount] = mTexcoordsp[mCount-1];
|
||||
mColorsp[mCount] = mColorsp[mCount-1];
|
||||
}
|
||||
}
|
||||
else
|
||||
// mVerticesp[mCount++] = verts[i-1];
|
||||
// mTexcoordsp[mCount] = mTexcoordsp[mCount-1];
|
||||
// mColorsp[mCount] = mColorsp[mCount-1];
|
||||
//
|
||||
// //copy last one
|
||||
// mVerticesp[mCount++] = verts[i++];
|
||||
// mTexcoordsp[mCount] = mTexcoordsp[mCount-1];
|
||||
// mColorsp[mCount] = mColorsp[mCount-1];
|
||||
// }
|
||||
//}
|
||||
//else
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
for (S32 i = 0; i < vert_count; i++)
|
||||
{
|
||||
|
|
@ -2037,41 +2074,43 @@ void LLRender::vertexBatchPreTransformed(LLVector3* verts, LLVector2* uvs, S32 v
|
|||
return;
|
||||
}
|
||||
|
||||
if (sGLCoreProfile && mMode == LLRender::QUADS)
|
||||
{ //quads are deprecated, convert to triangle list
|
||||
S32 i = 0;
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//if (sGLCoreProfile && mMode == LLRender::QUADS)
|
||||
//{ //quads are deprecated, convert to triangle list
|
||||
// S32 i = 0;
|
||||
|
||||
while (i < vert_count)
|
||||
{
|
||||
//read first three
|
||||
mVerticesp[mCount] = verts[i];
|
||||
mTexcoordsp[mCount++] = uvs[i++];
|
||||
mColorsp[mCount] = mColorsp[mCount-1];
|
||||
// while (i < vert_count)
|
||||
// {
|
||||
// //read first three
|
||||
// mVerticesp[mCount] = verts[i];
|
||||
// mTexcoordsp[mCount++] = uvs[i++];
|
||||
// mColorsp[mCount] = mColorsp[mCount-1];
|
||||
|
||||
mVerticesp[mCount] = verts[i];
|
||||
mTexcoordsp[mCount++] = uvs[i++];
|
||||
mColorsp[mCount] = mColorsp[mCount-1];
|
||||
// mVerticesp[mCount] = verts[i];
|
||||
// mTexcoordsp[mCount++] = uvs[i++];
|
||||
// mColorsp[mCount] = mColorsp[mCount-1];
|
||||
|
||||
mVerticesp[mCount] = verts[i];
|
||||
mTexcoordsp[mCount++] = uvs[i++];
|
||||
mColorsp[mCount] = mColorsp[mCount-1];
|
||||
// mVerticesp[mCount] = verts[i];
|
||||
// mTexcoordsp[mCount++] = uvs[i++];
|
||||
// mColorsp[mCount] = mColorsp[mCount-1];
|
||||
|
||||
//copy last two
|
||||
mVerticesp[mCount] = verts[i-3];
|
||||
mTexcoordsp[mCount++] = uvs[i-3];
|
||||
mColorsp[mCount] = mColorsp[mCount-1];
|
||||
// //copy last two
|
||||
// mVerticesp[mCount] = verts[i-3];
|
||||
// mTexcoordsp[mCount++] = uvs[i-3];
|
||||
// mColorsp[mCount] = mColorsp[mCount-1];
|
||||
|
||||
mVerticesp[mCount] = verts[i-1];
|
||||
mTexcoordsp[mCount++] = uvs[i-1];
|
||||
mColorsp[mCount] = mColorsp[mCount-1];
|
||||
// mVerticesp[mCount] = verts[i-1];
|
||||
// mTexcoordsp[mCount++] = uvs[i-1];
|
||||
// mColorsp[mCount] = mColorsp[mCount-1];
|
||||
|
||||
//copy last one
|
||||
mVerticesp[mCount] = verts[i];
|
||||
mTexcoordsp[mCount++] = uvs[i++];
|
||||
mColorsp[mCount] = mColorsp[mCount-1];
|
||||
}
|
||||
}
|
||||
else
|
||||
// //copy last one
|
||||
// mVerticesp[mCount] = verts[i];
|
||||
// mTexcoordsp[mCount++] = uvs[i++];
|
||||
// mColorsp[mCount] = mColorsp[mCount-1];
|
||||
// }
|
||||
//}
|
||||
//else
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
for (S32 i = 0; i < vert_count; i++)
|
||||
{
|
||||
|
|
@ -2099,41 +2138,43 @@ void LLRender::vertexBatchPreTransformed(LLVector3* verts, LLVector2* uvs, LLCol
|
|||
}
|
||||
|
||||
|
||||
if (sGLCoreProfile && mMode == LLRender::QUADS)
|
||||
{ //quads are deprecated, convert to triangle list
|
||||
S32 i = 0;
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//if (sGLCoreProfile && mMode == LLRender::QUADS)
|
||||
//{ //quads are deprecated, convert to triangle list
|
||||
// S32 i = 0;
|
||||
|
||||
while (i < vert_count)
|
||||
{
|
||||
//read first three
|
||||
mVerticesp[mCount] = verts[i];
|
||||
mTexcoordsp[mCount] = uvs[i];
|
||||
mColorsp[mCount++] = colors[i++];
|
||||
// while (i < vert_count)
|
||||
// {
|
||||
// //read first three
|
||||
// mVerticesp[mCount] = verts[i];
|
||||
// mTexcoordsp[mCount] = uvs[i];
|
||||
// mColorsp[mCount++] = colors[i++];
|
||||
|
||||
mVerticesp[mCount] = verts[i];
|
||||
mTexcoordsp[mCount] = uvs[i];
|
||||
mColorsp[mCount++] = colors[i++];
|
||||
// mVerticesp[mCount] = verts[i];
|
||||
// mTexcoordsp[mCount] = uvs[i];
|
||||
// mColorsp[mCount++] = colors[i++];
|
||||
|
||||
mVerticesp[mCount] = verts[i];
|
||||
mTexcoordsp[mCount] = uvs[i];
|
||||
mColorsp[mCount++] = colors[i++];
|
||||
// mVerticesp[mCount] = verts[i];
|
||||
// mTexcoordsp[mCount] = uvs[i];
|
||||
// mColorsp[mCount++] = colors[i++];
|
||||
|
||||
//copy last two
|
||||
mVerticesp[mCount] = verts[i-3];
|
||||
mTexcoordsp[mCount] = uvs[i-3];
|
||||
mColorsp[mCount++] = colors[i-3];
|
||||
// //copy last two
|
||||
// mVerticesp[mCount] = verts[i-3];
|
||||
// mTexcoordsp[mCount] = uvs[i-3];
|
||||
// mColorsp[mCount++] = colors[i-3];
|
||||
|
||||
mVerticesp[mCount] = verts[i-1];
|
||||
mTexcoordsp[mCount] = uvs[i-1];
|
||||
mColorsp[mCount++] = colors[i-1];
|
||||
// mVerticesp[mCount] = verts[i-1];
|
||||
// mTexcoordsp[mCount] = uvs[i-1];
|
||||
// mColorsp[mCount++] = colors[i-1];
|
||||
|
||||
//copy last one
|
||||
mVerticesp[mCount] = verts[i];
|
||||
mTexcoordsp[mCount] = uvs[i];
|
||||
mColorsp[mCount++] = colors[i++];
|
||||
}
|
||||
}
|
||||
else
|
||||
// //copy last one
|
||||
// mVerticesp[mCount] = verts[i];
|
||||
// mTexcoordsp[mCount] = uvs[i];
|
||||
// mColorsp[mCount++] = colors[i++];
|
||||
// }
|
||||
//}
|
||||
//else
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
for (S32 i = 0; i < vert_count; i++)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -277,7 +277,8 @@ public:
|
|||
POINTS,
|
||||
LINES,
|
||||
LINE_STRIP,
|
||||
QUADS,
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//QUADS,
|
||||
LINE_LOOP,
|
||||
NUM_MODES
|
||||
} eGeomModes;
|
||||
|
|
@ -338,6 +339,10 @@ public:
|
|||
~LLRender();
|
||||
void init() ;
|
||||
void shutdown();
|
||||
// <FS:Ansariel> Reset VB during TP
|
||||
void initVB();
|
||||
void destroyVB();
|
||||
// </FS:Ansariel>
|
||||
|
||||
// Refreshes renderer state to the cached values
|
||||
// Needed when the render context has changed and invalidated the current state
|
||||
|
|
@ -451,7 +456,8 @@ private:
|
|||
LLColor4 mAmbientLightColor;
|
||||
|
||||
bool mDirty;
|
||||
U32 mQuadCycle;
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//U32 mQuadCycle;
|
||||
U32 mCount;
|
||||
U32 mMode;
|
||||
U32 mCurrTextureUnitIndex;
|
||||
|
|
|
|||
|
|
@ -125,12 +125,25 @@ void gl_rect_2d(S32 left, S32 top, S32 right, S32 bottom, BOOL filled )
|
|||
// Counterclockwise quad will face the viewer
|
||||
if( filled )
|
||||
{
|
||||
gGL.begin( LLRender::QUADS );
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//gGL.begin( LLRender::QUADS );
|
||||
// gGL.vertex2i(left, top);
|
||||
// gGL.vertex2i(left, bottom);
|
||||
// gGL.vertex2i(right, bottom);
|
||||
// gGL.vertex2i(right, top);
|
||||
//gGL.end();
|
||||
gGL.begin( LLRender::TRIANGLES );
|
||||
{
|
||||
gGL.vertex2i(left, top);
|
||||
gGL.vertex2i(left, bottom);
|
||||
gGL.vertex2i(right, bottom);
|
||||
|
||||
gGL.vertex2i(left, top);
|
||||
gGL.vertex2i(right, bottom);
|
||||
gGL.vertex2i(right, top);
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -201,7 +214,10 @@ void gl_drop_shadow(S32 left, S32 top, S32 right, S32 bottom, const LLColor4 &st
|
|||
LLColor4 end_color = start_color;
|
||||
end_color.mV[VALPHA] = 0.f;
|
||||
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//gGL.begin(LLRender::QUADS);
|
||||
gGL.begin(LLRender::TRIANGLES);
|
||||
// </FS:Ansariel>
|
||||
|
||||
// Right edge, CCW faces screen
|
||||
gGL.color4fv(start_color.mV);
|
||||
|
|
@ -209,6 +225,12 @@ void gl_drop_shadow(S32 left, S32 top, S32 right, S32 bottom, const LLColor4 &st
|
|||
gGL.vertex2i(right, bottom);
|
||||
gGL.color4fv(end_color.mV);
|
||||
gGL.vertex2i(right+lines, bottom);
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.color4fv(start_color.mV);
|
||||
gGL.vertex2i(right, top-lines);
|
||||
gGL.color4fv(end_color.mV);
|
||||
gGL.vertex2i(right+lines, bottom);
|
||||
// </FS:Ansariel>
|
||||
gGL.vertex2i(right+lines, top-lines);
|
||||
|
||||
// Bottom edge, CCW faces screen
|
||||
|
|
@ -217,6 +239,12 @@ void gl_drop_shadow(S32 left, S32 top, S32 right, S32 bottom, const LLColor4 &st
|
|||
gGL.vertex2i(left+lines, bottom);
|
||||
gGL.color4fv(end_color.mV);
|
||||
gGL.vertex2i(left+lines, bottom-lines);
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.color4fv(start_color.mV);
|
||||
gGL.vertex2i(right, bottom);
|
||||
gGL.color4fv(end_color.mV);
|
||||
gGL.vertex2i(left+lines, bottom-lines);
|
||||
// </FS:Ansariel>
|
||||
gGL.vertex2i(right, bottom-lines);
|
||||
|
||||
// bottom left Corner
|
||||
|
|
@ -226,6 +254,12 @@ void gl_drop_shadow(S32 left, S32 top, S32 right, S32 bottom, const LLColor4 &st
|
|||
gGL.vertex2i(left, bottom);
|
||||
// make the bottom left corner not sharp
|
||||
gGL.vertex2i(left+1, bottom-lines+1);
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.color4fv(start_color.mV);
|
||||
gGL.vertex2i(left+lines, bottom);
|
||||
gGL.color4fv(end_color.mV);
|
||||
gGL.vertex2i(left+1, bottom-lines+1);
|
||||
// </FS:Ansariel>
|
||||
gGL.vertex2i(left+lines, bottom-lines);
|
||||
|
||||
// bottom right corner
|
||||
|
|
@ -235,6 +269,12 @@ void gl_drop_shadow(S32 left, S32 top, S32 right, S32 bottom, const LLColor4 &st
|
|||
gGL.vertex2i(right, bottom-lines);
|
||||
// make the rightmost corner not sharp
|
||||
gGL.vertex2i(right+lines-1, bottom-lines+1);
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.color4fv(start_color.mV);
|
||||
gGL.vertex2i(right, bottom);
|
||||
gGL.color4fv(end_color.mV);
|
||||
gGL.vertex2i(right+lines-1, bottom-lines+1);
|
||||
// </FS:Ansariel>
|
||||
gGL.vertex2i(right+lines, bottom);
|
||||
|
||||
// top right corner
|
||||
|
|
@ -244,6 +284,12 @@ void gl_drop_shadow(S32 left, S32 top, S32 right, S32 bottom, const LLColor4 &st
|
|||
gGL.vertex2i( right+lines, top-lines );
|
||||
// make the corner not sharp
|
||||
gGL.vertex2i( right+lines-1, top-1 );
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.color4fv(start_color.mV);
|
||||
gGL.vertex2i( right, top-lines );
|
||||
gGL.color4fv(end_color.mV);
|
||||
gGL.vertex2i( right+lines-1, top-1 );
|
||||
// </FS:Ansariel>
|
||||
gGL.vertex2i( right, top );
|
||||
|
||||
gGL.end();
|
||||
|
|
@ -484,13 +530,19 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTex
|
|||
|
||||
gGL.color4fv(color.mV);
|
||||
|
||||
const S32 NUM_VERTICES = 9 * 4; // 9 quads
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//const S32 NUM_VERTICES = 9 * 4; // 9 quads
|
||||
const S32 NUM_VERTICES = 9 * 6; // 9 quads
|
||||
// </FS:Ansariel>
|
||||
LLVector2 uv[NUM_VERTICES];
|
||||
LLVector3 pos[NUM_VERTICES];
|
||||
|
||||
S32 index = 0;
|
||||
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//gGL.begin(LLRender::QUADS);
|
||||
gGL.begin(LLRender::TRIANGLES);
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
// draw bottom left
|
||||
uv[index] = LLVector2(uv_outer_rect.mLeft, uv_outer_rect.mBottom);
|
||||
|
|
@ -505,6 +557,16 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTex
|
|||
pos[index] = LLVector3(draw_center_rect.mLeft, draw_center_rect.mBottom, 0.f);
|
||||
index++;
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
uv[index] = LLVector2(uv_outer_rect.mLeft, uv_outer_rect.mBottom);
|
||||
pos[index] = LLVector3(draw_outer_rect.mLeft, draw_outer_rect.mBottom, 0.f);
|
||||
index++;
|
||||
|
||||
uv[index] = LLVector2(uv_center_rect.mLeft, uv_center_rect.mBottom);
|
||||
pos[index] = LLVector3(draw_center_rect.mLeft, draw_center_rect.mBottom, 0.f);
|
||||
index++;
|
||||
// </FS:Ansariel>
|
||||
|
||||
uv[index] = LLVector2(uv_outer_rect.mLeft, uv_center_rect.mBottom);
|
||||
pos[index] = LLVector3(draw_outer_rect.mLeft, draw_center_rect.mBottom, 0.f);
|
||||
index++;
|
||||
|
|
@ -522,6 +584,16 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTex
|
|||
pos[index] = LLVector3(draw_center_rect.mRight, draw_center_rect.mBottom, 0.f);
|
||||
index++;
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
uv[index] = LLVector2(uv_center_rect.mLeft, uv_outer_rect.mBottom);
|
||||
pos[index] = LLVector3(draw_center_rect.mLeft, draw_outer_rect.mBottom, 0.f);
|
||||
index++;
|
||||
|
||||
uv[index] = LLVector2(uv_center_rect.mRight, uv_center_rect.mBottom);
|
||||
pos[index] = LLVector3(draw_center_rect.mRight, draw_center_rect.mBottom, 0.f);
|
||||
index++;
|
||||
// </FS:Ansariel>
|
||||
|
||||
uv[index] = LLVector2(uv_center_rect.mLeft, uv_center_rect.mBottom);
|
||||
pos[index] = LLVector3(draw_center_rect.mLeft, draw_center_rect.mBottom, 0.f);
|
||||
index++;
|
||||
|
|
@ -539,6 +611,16 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTex
|
|||
pos[index] = LLVector3(draw_outer_rect.mRight, draw_center_rect.mBottom, 0.f);
|
||||
index++;
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
uv[index] = LLVector2(uv_center_rect.mRight, uv_outer_rect.mBottom);
|
||||
pos[index] = LLVector3(draw_center_rect.mRight, draw_outer_rect.mBottom, 0.f);
|
||||
index++;
|
||||
|
||||
uv[index] = LLVector2(uv_outer_rect.mRight, uv_center_rect.mBottom);
|
||||
pos[index] = LLVector3(draw_outer_rect.mRight, draw_center_rect.mBottom, 0.f);
|
||||
index++;
|
||||
// </FS:Ansariel>
|
||||
|
||||
uv[index] = LLVector2(uv_center_rect.mRight, uv_center_rect.mBottom);
|
||||
pos[index] = LLVector3(draw_center_rect.mRight, draw_center_rect.mBottom, 0.f);
|
||||
index++;
|
||||
|
|
@ -556,6 +638,16 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTex
|
|||
pos[index] = LLVector3(draw_center_rect.mLeft, draw_center_rect.mTop, 0.f);
|
||||
index++;
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
uv[index] = LLVector2(uv_outer_rect.mLeft, uv_center_rect.mBottom);
|
||||
pos[index] = LLVector3(draw_outer_rect.mLeft, draw_center_rect.mBottom, 0.f);
|
||||
index++;
|
||||
|
||||
uv[index] = LLVector2(uv_center_rect.mLeft, uv_center_rect.mTop);
|
||||
pos[index] = LLVector3(draw_center_rect.mLeft, draw_center_rect.mTop, 0.f);
|
||||
index++;
|
||||
// </FS:Ansariel>
|
||||
|
||||
uv[index] = LLVector2(uv_outer_rect.mLeft, uv_center_rect.mTop);
|
||||
pos[index] = LLVector3(draw_outer_rect.mLeft, draw_center_rect.mTop, 0.f);
|
||||
index++;
|
||||
|
|
@ -573,6 +665,16 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTex
|
|||
pos[index] = LLVector3(draw_center_rect.mRight, draw_center_rect.mTop, 0.f);
|
||||
index++;
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
uv[index] = LLVector2(uv_center_rect.mLeft, uv_center_rect.mBottom);
|
||||
pos[index] = LLVector3(draw_center_rect.mLeft, draw_center_rect.mBottom, 0.f);
|
||||
index++;
|
||||
|
||||
uv[index] = LLVector2(uv_center_rect.mRight, uv_center_rect.mTop);
|
||||
pos[index] = LLVector3(draw_center_rect.mRight, draw_center_rect.mTop, 0.f);
|
||||
index++;
|
||||
// </FS:Ansariel>
|
||||
|
||||
uv[index] = LLVector2(uv_center_rect.mLeft, uv_center_rect.mTop);
|
||||
pos[index] = LLVector3(draw_center_rect.mLeft, draw_center_rect.mTop, 0.f);
|
||||
index++;
|
||||
|
|
@ -590,6 +692,16 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTex
|
|||
pos[index] = LLVector3(draw_outer_rect.mRight, draw_center_rect.mTop, 0.f);
|
||||
index++;
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
uv[index] = LLVector2(uv_center_rect.mRight, uv_center_rect.mBottom);
|
||||
pos[index] = LLVector3(draw_center_rect.mRight, draw_center_rect.mBottom, 0.f);
|
||||
index++;
|
||||
|
||||
uv[index] = LLVector2(uv_outer_rect.mRight, uv_center_rect.mTop);
|
||||
pos[index] = LLVector3(draw_outer_rect.mRight, draw_center_rect.mTop, 0.f);
|
||||
index++;
|
||||
// </FS:Ansariel>
|
||||
|
||||
uv[index] = LLVector2(uv_center_rect.mRight, uv_center_rect.mTop);
|
||||
pos[index] = LLVector3(draw_center_rect.mRight, draw_center_rect.mTop, 0.f);
|
||||
index++;
|
||||
|
|
@ -607,6 +719,16 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTex
|
|||
pos[index] = LLVector3(draw_center_rect.mLeft, draw_outer_rect.mTop, 0.f);
|
||||
index++;
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
uv[index] = LLVector2(uv_outer_rect.mLeft, uv_center_rect.mTop);
|
||||
pos[index] = LLVector3(draw_outer_rect.mLeft, draw_center_rect.mTop, 0.f);
|
||||
index++;
|
||||
|
||||
uv[index] = LLVector2(uv_center_rect.mLeft, uv_outer_rect.mTop);
|
||||
pos[index] = LLVector3(draw_center_rect.mLeft, draw_outer_rect.mTop, 0.f);
|
||||
index++;
|
||||
// </FS:Ansariel>
|
||||
|
||||
uv[index] = LLVector2(uv_outer_rect.mLeft, uv_outer_rect.mTop);
|
||||
pos[index] = LLVector3(draw_outer_rect.mLeft, draw_outer_rect.mTop, 0.f);
|
||||
index++;
|
||||
|
|
@ -624,6 +746,16 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTex
|
|||
pos[index] = LLVector3(draw_center_rect.mRight, draw_outer_rect.mTop, 0.f);
|
||||
index++;
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
uv[index] = LLVector2(uv_center_rect.mLeft, uv_center_rect.mTop);
|
||||
pos[index] = LLVector3(draw_center_rect.mLeft, draw_center_rect.mTop, 0.f);
|
||||
index++;
|
||||
|
||||
uv[index] = LLVector2(uv_center_rect.mRight, uv_outer_rect.mTop);
|
||||
pos[index] = LLVector3(draw_center_rect.mRight, draw_outer_rect.mTop, 0.f);
|
||||
index++;
|
||||
// </FS:Ansariel>
|
||||
|
||||
uv[index] = LLVector2(uv_center_rect.mLeft, uv_outer_rect.mTop);
|
||||
pos[index] = LLVector3(draw_center_rect.mLeft, draw_outer_rect.mTop, 0.f);
|
||||
index++;
|
||||
|
|
@ -641,6 +773,16 @@ void gl_draw_scaled_image_with_border(S32 x, S32 y, S32 width, S32 height, LLTex
|
|||
pos[index] = LLVector3(draw_outer_rect.mRight, draw_outer_rect.mTop, 0.f);
|
||||
index++;
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
uv[index] = LLVector2(uv_center_rect.mRight, uv_center_rect.mTop);
|
||||
pos[index] = LLVector3(draw_center_rect.mRight, draw_center_rect.mTop, 0.f);
|
||||
index++;
|
||||
|
||||
uv[index] = LLVector2(uv_outer_rect.mRight, uv_outer_rect.mTop);
|
||||
pos[index] = LLVector3(draw_outer_rect.mRight, draw_outer_rect.mTop, 0.f);
|
||||
index++;
|
||||
// </FS:Ansariel>
|
||||
|
||||
uv[index] = LLVector2(uv_center_rect.mRight, uv_outer_rect.mTop);
|
||||
pos[index] = LLVector3(draw_center_rect.mRight, draw_outer_rect.mTop, 0.f);
|
||||
index++;
|
||||
|
|
@ -691,11 +833,17 @@ void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degre
|
|||
|
||||
if (degrees == 0.f)
|
||||
{
|
||||
const S32 NUM_VERTICES = 4; // 9 quads
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//const S32 NUM_VERTICES = 4; // 9 quads
|
||||
const S32 NUM_VERTICES = 6; // 9 quads
|
||||
// </FS:Ansariel>
|
||||
LLVector2 uv[NUM_VERTICES];
|
||||
LLVector3 pos[NUM_VERTICES];
|
||||
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//gGL.begin(LLRender::QUADS);
|
||||
gGL.begin(LLRender::TRIANGLES);
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
LLVector3 ui_scale = gGL.getUIScale();
|
||||
LLVector3 ui_translation = gGL.getUITranslation();
|
||||
|
|
@ -718,6 +866,16 @@ void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degre
|
|||
pos[index] = LLVector3(ui_translation.mV[VX], ui_translation.mV[VY], 0.f);
|
||||
index++;
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
uv[index] = LLVector2(uv_rect.mRight, uv_rect.mTop);
|
||||
pos[index] = LLVector3(ui_translation.mV[VX] + scaled_width, ui_translation.mV[VY] + scaled_height, 0.f);
|
||||
index++;
|
||||
|
||||
uv[index] = LLVector2(uv_rect.mLeft, uv_rect.mBottom);
|
||||
pos[index] = LLVector3(ui_translation.mV[VX], ui_translation.mV[VY], 0.f);
|
||||
index++;
|
||||
// </FS:Ansariel>
|
||||
|
||||
uv[index] = LLVector2(uv_rect.mRight, uv_rect.mBottom);
|
||||
pos[index] = LLVector3(ui_translation.mV[VX] + scaled_width, ui_translation.mV[VY], 0.f);
|
||||
index++;
|
||||
|
|
@ -749,27 +907,56 @@ void gl_draw_scaled_rotated_image(S32 x, S32 y, S32 width, S32 height, F32 degre
|
|||
|
||||
gGL.color4fv(color.mV);
|
||||
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//gGL.begin(LLRender::QUADS);
|
||||
//{
|
||||
// LLVector3 v;
|
||||
|
||||
// v = LLVector3(offset_x, offset_y, 0.f) * quat;
|
||||
// gGL.texCoord2f(uv_rect.mRight, uv_rect.mTop);
|
||||
// gGL.vertex2f(v.mV[0], v.mV[1] );
|
||||
|
||||
// v = LLVector3(-offset_x, offset_y, 0.f) * quat;
|
||||
// gGL.texCoord2f(uv_rect.mLeft, uv_rect.mTop);
|
||||
// gGL.vertex2f(v.mV[0], v.mV[1] );
|
||||
|
||||
// v = LLVector3(-offset_x, -offset_y, 0.f) * quat;
|
||||
// gGL.texCoord2f(uv_rect.mLeft, uv_rect.mBottom);
|
||||
// gGL.vertex2f(v.mV[0], v.mV[1] );
|
||||
|
||||
// v = LLVector3(offset_x, -offset_y, 0.f) * quat;
|
||||
// gGL.texCoord2f(uv_rect.mRight, uv_rect.mBottom);
|
||||
// gGL.vertex2f(v.mV[0], v.mV[1] );
|
||||
//}
|
||||
//gGL.end();
|
||||
gGL.begin(LLRender::TRIANGLES);
|
||||
{
|
||||
LLVector3 v;
|
||||
LLVector3 v1 = LLVector3(offset_x, offset_y, 0.f) * quat;
|
||||
LLVector3 v2 = LLVector3(-offset_x, offset_y, 0.f) * quat;
|
||||
LLVector3 v3 = LLVector3(-offset_x, -offset_y, 0.f) * quat;
|
||||
LLVector3 v4 = LLVector3(offset_x, -offset_y, 0.f) * quat;
|
||||
|
||||
v = LLVector3(offset_x, offset_y, 0.f) * quat;
|
||||
gGL.texCoord2f(uv_rect.mRight, uv_rect.mTop);
|
||||
gGL.vertex2f(v.mV[0], v.mV[1] );
|
||||
gGL.vertex2f(v1.mV[0], v1.mV[1] );
|
||||
|
||||
v = LLVector3(-offset_x, offset_y, 0.f) * quat;
|
||||
gGL.texCoord2f(uv_rect.mLeft, uv_rect.mTop);
|
||||
gGL.vertex2f(v.mV[0], v.mV[1] );
|
||||
gGL.vertex2f(v2.mV[0], v2.mV[1] );
|
||||
|
||||
v = LLVector3(-offset_x, -offset_y, 0.f) * quat;
|
||||
gGL.texCoord2f(uv_rect.mLeft, uv_rect.mBottom);
|
||||
gGL.vertex2f(v.mV[0], v.mV[1] );
|
||||
gGL.vertex2f(v3.mV[0], v3.mV[1] );
|
||||
|
||||
|
||||
gGL.texCoord2f(uv_rect.mRight, uv_rect.mTop);
|
||||
gGL.vertex2f(v1.mV[0], v1.mV[1] );
|
||||
|
||||
gGL.texCoord2f(uv_rect.mLeft, uv_rect.mBottom);
|
||||
gGL.vertex2f(v3.mV[0], v3.mV[1] );
|
||||
|
||||
v = LLVector3(offset_x, -offset_y, 0.f) * quat;
|
||||
gGL.texCoord2f(uv_rect.mRight, uv_rect.mBottom);
|
||||
gGL.vertex2f(v.mV[0], v.mV[1] );
|
||||
gGL.vertex2f(v4.mV[0], v4.mV[1] );
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
gGL.popUIMatrix();
|
||||
}
|
||||
}
|
||||
|
|
@ -1058,8 +1245,24 @@ void gl_washer_segment_2d(F32 outer_radius, F32 inner_radius, F32 start_radians,
|
|||
|
||||
void gl_rect_2d_simple_tex( S32 width, S32 height )
|
||||
{
|
||||
gGL.begin( LLRender::QUADS );
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//gGL.begin( LLRender::QUADS );
|
||||
|
||||
// gGL.texCoord2f(1.f, 1.f);
|
||||
// gGL.vertex2i(width, height);
|
||||
|
||||
// gGL.texCoord2f(0.f, 1.f);
|
||||
// gGL.vertex2i(0, height);
|
||||
|
||||
// gGL.texCoord2f(0.f, 0.f);
|
||||
// gGL.vertex2i(0, 0);
|
||||
|
||||
// gGL.texCoord2f(1.f, 0.f);
|
||||
// gGL.vertex2i(width, 0);
|
||||
//
|
||||
//gGL.end();
|
||||
gGL.begin( LLRender::TRIANGLES );
|
||||
{
|
||||
gGL.texCoord2f(1.f, 1.f);
|
||||
gGL.vertex2i(width, height);
|
||||
|
||||
|
|
@ -1069,20 +1272,41 @@ void gl_rect_2d_simple_tex( S32 width, S32 height )
|
|||
gGL.texCoord2f(0.f, 0.f);
|
||||
gGL.vertex2i(0, 0);
|
||||
|
||||
|
||||
gGL.texCoord2f(1.f, 1.f);
|
||||
gGL.vertex2i(width, height);
|
||||
|
||||
gGL.texCoord2f(0.f, 0.f);
|
||||
gGL.vertex2i(0, 0);
|
||||
|
||||
gGL.texCoord2f(1.f, 0.f);
|
||||
gGL.vertex2i(width, 0);
|
||||
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
|
||||
void gl_rect_2d_simple( S32 width, S32 height )
|
||||
{
|
||||
gGL.begin( LLRender::QUADS );
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//gGL.begin( LLRender::QUADS );
|
||||
// gGL.vertex2i(width, height);
|
||||
// gGL.vertex2i(0, height);
|
||||
// gGL.vertex2i(0, 0);
|
||||
// gGL.vertex2i(width, 0);
|
||||
//gGL.end();
|
||||
gGL.begin( LLRender::TRIANGLES );
|
||||
{
|
||||
gGL.vertex2i(width, height);
|
||||
gGL.vertex2i(0, height);
|
||||
gGL.vertex2i(0, 0);
|
||||
|
||||
gGL.vertex2i(width, height);
|
||||
gGL.vertex2i(0, 0);
|
||||
gGL.vertex2i(width, 0);
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
|
||||
static LLTrace::BlockTimerStatHandle FTM_RENDER_SEGMENTED_RECT ("Render segmented rectangle");
|
||||
|
|
@ -1123,7 +1347,10 @@ void gl_segmented_rect_2d_tex(const S32 left,
|
|||
LLVector2 width_vec((F32)width, 0.f);
|
||||
LLVector2 height_vec(0.f, (F32)height);
|
||||
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//gGL.begin(LLRender::QUADS);
|
||||
gGL.begin(LLRender::TRIANGLES);
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
// draw bottom left
|
||||
gGL.texCoord2f(0.f, 0.f);
|
||||
|
|
@ -1135,6 +1362,14 @@ void gl_segmented_rect_2d_tex(const S32 left,
|
|||
gGL.texCoord2f(border_uv_scale.mV[VX], border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((border_width_left + border_height_bottom).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(0.f, 0.f);
|
||||
gGL.vertex2f(0.f, 0.f);
|
||||
|
||||
gGL.texCoord2f(border_uv_scale.mV[VX], border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((border_width_left + border_height_bottom).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(0.f, border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv(border_height_bottom.mV);
|
||||
|
||||
|
|
@ -1148,6 +1383,14 @@ void gl_segmented_rect_2d_tex(const S32 left,
|
|||
gGL.texCoord2f(1.f - border_uv_scale.mV[VX], border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((width_vec - border_width_right + border_height_bottom).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(border_uv_scale.mV[VX], 0.f);
|
||||
gGL.vertex2fv(border_width_left.mV);
|
||||
|
||||
gGL.texCoord2f(1.f - border_uv_scale.mV[VX], border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((width_vec - border_width_right + border_height_bottom).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(border_uv_scale.mV[VX], border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((border_width_left + border_height_bottom).mV);
|
||||
|
||||
|
|
@ -1161,6 +1404,14 @@ void gl_segmented_rect_2d_tex(const S32 left,
|
|||
gGL.texCoord2f(1.f, border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((width_vec + border_height_bottom).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(1.f - border_uv_scale.mV[VX], 0.f);
|
||||
gGL.vertex2fv((width_vec - border_width_right).mV);
|
||||
|
||||
gGL.texCoord2f(1.f, border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((width_vec + border_height_bottom).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(1.f - border_uv_scale.mV[VX], border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((width_vec - border_width_right + border_height_bottom).mV);
|
||||
|
||||
|
|
@ -1174,6 +1425,14 @@ void gl_segmented_rect_2d_tex(const S32 left,
|
|||
gGL.texCoord2f(border_uv_scale.mV[VX], 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((border_width_left + height_vec - border_height_top).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(0.f, border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv(border_height_bottom.mV);
|
||||
|
||||
gGL.texCoord2f(border_uv_scale.mV[VX], 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((border_width_left + height_vec - border_height_top).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(0.f, 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((height_vec - border_height_top).mV);
|
||||
|
||||
|
|
@ -1187,6 +1446,14 @@ void gl_segmented_rect_2d_tex(const S32 left,
|
|||
gGL.texCoord2f(1.f - border_uv_scale.mV[VX], 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((width_vec - border_width_right + height_vec - border_height_top).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(border_uv_scale.mV[VX], border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((border_width_left + border_height_bottom).mV);
|
||||
|
||||
gGL.texCoord2f(1.f - border_uv_scale.mV[VX], 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((width_vec - border_width_right + height_vec - border_height_top).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(border_uv_scale.mV[VX], 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((border_width_left + height_vec - border_height_top).mV);
|
||||
|
||||
|
|
@ -1200,6 +1467,14 @@ void gl_segmented_rect_2d_tex(const S32 left,
|
|||
gGL.texCoord2f(1.f, 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((width_vec + height_vec - border_height_top).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(1.f - border_uv_scale.mV[VX], border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((width_vec - border_width_right + border_height_bottom).mV);
|
||||
|
||||
gGL.texCoord2f(1.f, 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((width_vec + height_vec - border_height_top).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(1.f - border_uv_scale.mV[VX], 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((width_vec - border_width_right + height_vec - border_height_top).mV);
|
||||
|
||||
|
|
@ -1213,6 +1488,14 @@ void gl_segmented_rect_2d_tex(const S32 left,
|
|||
gGL.texCoord2f(border_uv_scale.mV[VX], 1.f);
|
||||
gGL.vertex2fv((border_width_left + height_vec).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(0.f, 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((height_vec - border_height_top).mV);
|
||||
|
||||
gGL.texCoord2f(border_uv_scale.mV[VX], 1.f);
|
||||
gGL.vertex2fv((border_width_left + height_vec).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(0.f, 1.f);
|
||||
gGL.vertex2fv((height_vec).mV);
|
||||
|
||||
|
|
@ -1226,6 +1509,14 @@ void gl_segmented_rect_2d_tex(const S32 left,
|
|||
gGL.texCoord2f(1.f - border_uv_scale.mV[VX], 1.f);
|
||||
gGL.vertex2fv((width_vec - border_width_right + height_vec).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(border_uv_scale.mV[VX], 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((border_width_left + height_vec - border_height_top).mV);
|
||||
|
||||
gGL.texCoord2f(1.f - border_uv_scale.mV[VX], 1.f);
|
||||
gGL.vertex2fv((width_vec - border_width_right + height_vec).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(border_uv_scale.mV[VX], 1.f);
|
||||
gGL.vertex2fv((border_width_left + height_vec).mV);
|
||||
|
||||
|
|
@ -1239,6 +1530,14 @@ void gl_segmented_rect_2d_tex(const S32 left,
|
|||
gGL.texCoord2f(1.f, 1.f);
|
||||
gGL.vertex2fv((width_vec + height_vec).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(1.f - border_uv_scale.mV[VX], 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((width_vec - border_width_right + height_vec - border_height_top).mV);
|
||||
|
||||
gGL.texCoord2f(1.f, 1.f);
|
||||
gGL.vertex2fv((width_vec + height_vec).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(1.f - border_uv_scale.mV[VX], 1.f);
|
||||
gGL.vertex2fv((width_vec - border_width_right + height_vec).mV);
|
||||
}
|
||||
|
|
@ -1293,7 +1592,10 @@ void gl_segmented_rect_2d_fragment_tex(const LLRect& rect,
|
|||
LLVector2 x_min;
|
||||
LLVector2 x_max;
|
||||
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//gGL.begin(LLRender::QUADS);
|
||||
gGL.begin(LLRender::TRIANGLES);
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
if (start_fragment < middle_start)
|
||||
{
|
||||
|
|
@ -1312,6 +1614,14 @@ void gl_segmented_rect_2d_fragment_tex(const LLRect& rect,
|
|||
gGL.texCoord2f(u_max, border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_max + border_height_bottom).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(u_min, 0.f);
|
||||
gGL.vertex2fv(x_min.mV);
|
||||
|
||||
gGL.texCoord2f(u_max, border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_max + border_height_bottom).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(u_min, border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_min + border_height_bottom).mV);
|
||||
|
||||
|
|
@ -1325,6 +1635,14 @@ void gl_segmented_rect_2d_fragment_tex(const LLRect& rect,
|
|||
gGL.texCoord2f(u_max, 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_max + height_vec - border_height_top).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(u_min, border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_min + border_height_bottom).mV);
|
||||
|
||||
gGL.texCoord2f(u_max, 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_max + height_vec - border_height_top).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(u_min, 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_min + height_vec - border_height_top).mV);
|
||||
|
||||
|
|
@ -1338,6 +1656,14 @@ void gl_segmented_rect_2d_fragment_tex(const LLRect& rect,
|
|||
gGL.texCoord2f(u_max, 1.f);
|
||||
gGL.vertex2fv((x_max + height_vec).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(u_min, 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_min + height_vec - border_height_top).mV);
|
||||
|
||||
gGL.texCoord2f(u_max, 1.f);
|
||||
gGL.vertex2fv((x_max + height_vec).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(u_min, 1.f);
|
||||
gGL.vertex2fv((x_min + height_vec).mV);
|
||||
}
|
||||
|
|
@ -1357,6 +1683,14 @@ void gl_segmented_rect_2d_fragment_tex(const LLRect& rect,
|
|||
gGL.texCoord2f(1.f - border_uv_scale.mV[VX], border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_max + border_height_bottom).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(border_uv_scale.mV[VX], 0.f);
|
||||
gGL.vertex2fv(x_min.mV);
|
||||
|
||||
gGL.texCoord2f(1.f - border_uv_scale.mV[VX], border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_max + border_height_bottom).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(border_uv_scale.mV[VX], border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_min + border_height_bottom).mV);
|
||||
|
||||
|
|
@ -1370,6 +1704,14 @@ void gl_segmented_rect_2d_fragment_tex(const LLRect& rect,
|
|||
gGL.texCoord2f(1.f - border_uv_scale.mV[VX], 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_max + height_vec - border_height_top).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(border_uv_scale.mV[VX], border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_min + border_height_bottom).mV);
|
||||
|
||||
gGL.texCoord2f(1.f - border_uv_scale.mV[VX], 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_max + height_vec - border_height_top).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(border_uv_scale.mV[VX], 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_min + height_vec - border_height_top).mV);
|
||||
|
||||
|
|
@ -1383,6 +1725,14 @@ void gl_segmented_rect_2d_fragment_tex(const LLRect& rect,
|
|||
gGL.texCoord2f(1.f - border_uv_scale.mV[VX], 1.f);
|
||||
gGL.vertex2fv((x_max + height_vec).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(border_uv_scale.mV[VX], 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_min + height_vec - border_height_top).mV);
|
||||
|
||||
gGL.texCoord2f(1.f - border_uv_scale.mV[VX], 1.f);
|
||||
gGL.vertex2fv((x_max + height_vec).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(border_uv_scale.mV[VX], 1.f);
|
||||
gGL.vertex2fv((x_min + height_vec).mV);
|
||||
}
|
||||
|
|
@ -1404,6 +1754,14 @@ void gl_segmented_rect_2d_fragment_tex(const LLRect& rect,
|
|||
gGL.texCoord2f(u_max, border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_max + border_height_bottom).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(u_min, 0.f);
|
||||
gGL.vertex2fv((x_min).mV);
|
||||
|
||||
gGL.texCoord2f(u_max, border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_max + border_height_bottom).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(u_min, border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_min + border_height_bottom).mV);
|
||||
|
||||
|
|
@ -1417,6 +1775,14 @@ void gl_segmented_rect_2d_fragment_tex(const LLRect& rect,
|
|||
gGL.texCoord2f(u_max, 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_max + height_vec - border_height_top).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(u_min, border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_min + border_height_bottom).mV);
|
||||
|
||||
gGL.texCoord2f(u_max, 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_max + height_vec - border_height_top).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(u_min, 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_min + height_vec - border_height_top).mV);
|
||||
|
||||
|
|
@ -1430,6 +1796,14 @@ void gl_segmented_rect_2d_fragment_tex(const LLRect& rect,
|
|||
gGL.texCoord2f(u_max, 1.f);
|
||||
gGL.vertex2fv((x_max + height_vec).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(u_min, 1.f - border_uv_scale.mV[VY]);
|
||||
gGL.vertex2fv((x_min + height_vec - border_height_top).mV);
|
||||
|
||||
gGL.texCoord2f(u_max, 1.f);
|
||||
gGL.vertex2fv((x_max + height_vec).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(u_min, 1.f);
|
||||
gGL.vertex2fv((x_min + height_vec).mV);
|
||||
}
|
||||
|
|
@ -1444,7 +1818,10 @@ void gl_segmented_rect_3d_tex(const LLRectf& clip_rect, const LLRectf& center_uv
|
|||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_RENDER_SEGMENTED_RECT);
|
||||
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//gGL.begin(LLRender::QUADS);
|
||||
gGL.begin(LLRender::TRIANGLES);
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
// draw bottom left
|
||||
gGL.texCoord2f(clip_rect.mLeft, clip_rect.mBottom);
|
||||
|
|
@ -1456,6 +1833,14 @@ void gl_segmented_rect_3d_tex(const LLRectf& clip_rect, const LLRectf& center_uv
|
|||
gGL.texCoord2f(center_uv_rect.mLeft, center_uv_rect.mBottom);
|
||||
gGL.vertex3fv((center_draw_rect.mLeft * width_vec + center_draw_rect.mBottom * height_vec).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(clip_rect.mLeft, clip_rect.mBottom);
|
||||
gGL.vertex3f(0.f, 0.f, 0.f);
|
||||
|
||||
gGL.texCoord2f(center_uv_rect.mLeft, center_uv_rect.mBottom);
|
||||
gGL.vertex3fv((center_draw_rect.mLeft * width_vec + center_draw_rect.mBottom * height_vec).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(clip_rect.mLeft, center_uv_rect.mBottom);
|
||||
gGL.vertex3fv((center_draw_rect.mBottom * height_vec).mV);
|
||||
|
||||
|
|
@ -1469,6 +1854,14 @@ void gl_segmented_rect_3d_tex(const LLRectf& clip_rect, const LLRectf& center_uv
|
|||
gGL.texCoord2f(center_uv_rect.mRight, center_uv_rect.mBottom);
|
||||
gGL.vertex3fv((center_draw_rect.mRight * width_vec + center_draw_rect.mBottom * height_vec).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(center_uv_rect.mLeft, clip_rect.mBottom);
|
||||
gGL.vertex3fv((center_draw_rect.mLeft * width_vec).mV);
|
||||
|
||||
gGL.texCoord2f(center_uv_rect.mRight, center_uv_rect.mBottom);
|
||||
gGL.vertex3fv((center_draw_rect.mRight * width_vec + center_draw_rect.mBottom * height_vec).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(center_uv_rect.mLeft, center_uv_rect.mBottom);
|
||||
gGL.vertex3fv((center_draw_rect.mLeft * width_vec + center_draw_rect.mBottom * height_vec).mV);
|
||||
|
||||
|
|
@ -1482,6 +1875,14 @@ void gl_segmented_rect_3d_tex(const LLRectf& clip_rect, const LLRectf& center_uv
|
|||
gGL.texCoord2f(clip_rect.mRight, center_uv_rect.mBottom);
|
||||
gGL.vertex3fv((width_vec + center_draw_rect.mBottom * height_vec).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(center_uv_rect.mRight, clip_rect.mBottom);
|
||||
gGL.vertex3fv((center_draw_rect.mRight * width_vec).mV);
|
||||
|
||||
gGL.texCoord2f(clip_rect.mRight, center_uv_rect.mBottom);
|
||||
gGL.vertex3fv((width_vec + center_draw_rect.mBottom * height_vec).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(center_uv_rect.mRight, center_uv_rect.mBottom);
|
||||
gGL.vertex3fv((center_draw_rect.mRight * width_vec + center_draw_rect.mBottom * height_vec).mV);
|
||||
|
||||
|
|
@ -1495,6 +1896,14 @@ void gl_segmented_rect_3d_tex(const LLRectf& clip_rect, const LLRectf& center_uv
|
|||
gGL.texCoord2f(center_uv_rect.mLeft, center_uv_rect.mTop);
|
||||
gGL.vertex3fv((center_draw_rect.mLeft * width_vec + center_draw_rect.mTop * height_vec).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(clip_rect.mLeft, center_uv_rect.mBottom);
|
||||
gGL.vertex3fv((center_draw_rect.mBottom * height_vec).mV);
|
||||
|
||||
gGL.texCoord2f(center_uv_rect.mLeft, center_uv_rect.mTop);
|
||||
gGL.vertex3fv((center_draw_rect.mLeft * width_vec + center_draw_rect.mTop * height_vec).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(clip_rect.mLeft, center_uv_rect.mTop);
|
||||
gGL.vertex3fv((center_draw_rect.mTop * height_vec).mV);
|
||||
|
||||
|
|
@ -1508,6 +1917,14 @@ void gl_segmented_rect_3d_tex(const LLRectf& clip_rect, const LLRectf& center_uv
|
|||
gGL.texCoord2f(center_uv_rect.mRight, center_uv_rect.mTop);
|
||||
gGL.vertex3fv((center_draw_rect.mRight * width_vec + center_draw_rect.mTop * height_vec).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(center_uv_rect.mLeft, center_uv_rect.mBottom);
|
||||
gGL.vertex3fv((center_draw_rect.mLeft * width_vec + center_draw_rect.mBottom * height_vec).mV);
|
||||
|
||||
gGL.texCoord2f(center_uv_rect.mRight, center_uv_rect.mTop);
|
||||
gGL.vertex3fv((center_draw_rect.mRight * width_vec + center_draw_rect.mTop * height_vec).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(center_uv_rect.mLeft, center_uv_rect.mTop);
|
||||
gGL.vertex3fv((center_draw_rect.mLeft * width_vec + center_draw_rect.mTop * height_vec).mV);
|
||||
|
||||
|
|
@ -1521,6 +1938,14 @@ void gl_segmented_rect_3d_tex(const LLRectf& clip_rect, const LLRectf& center_uv
|
|||
gGL.texCoord2f(clip_rect.mRight, center_uv_rect.mTop);
|
||||
gGL.vertex3fv((width_vec + center_draw_rect.mTop * height_vec).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(center_uv_rect.mRight, center_uv_rect.mBottom);
|
||||
gGL.vertex3fv((center_draw_rect.mRight * width_vec + center_draw_rect.mBottom * height_vec).mV);
|
||||
|
||||
gGL.texCoord2f(clip_rect.mRight, center_uv_rect.mTop);
|
||||
gGL.vertex3fv((width_vec + center_draw_rect.mTop * height_vec).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(center_uv_rect.mRight, center_uv_rect.mTop);
|
||||
gGL.vertex3fv((center_draw_rect.mRight * width_vec + center_draw_rect.mTop * height_vec).mV);
|
||||
|
||||
|
|
@ -1534,6 +1959,14 @@ void gl_segmented_rect_3d_tex(const LLRectf& clip_rect, const LLRectf& center_uv
|
|||
gGL.texCoord2f(center_uv_rect.mLeft, clip_rect.mTop);
|
||||
gGL.vertex3fv((center_draw_rect.mLeft * width_vec + height_vec).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(clip_rect.mLeft, center_uv_rect.mTop);
|
||||
gGL.vertex3fv((center_draw_rect.mTop * height_vec).mV);
|
||||
|
||||
gGL.texCoord2f(center_uv_rect.mLeft, clip_rect.mTop);
|
||||
gGL.vertex3fv((center_draw_rect.mLeft * width_vec + height_vec).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(clip_rect.mLeft, clip_rect.mTop);
|
||||
gGL.vertex3fv((height_vec).mV);
|
||||
|
||||
|
|
@ -1547,6 +1980,14 @@ void gl_segmented_rect_3d_tex(const LLRectf& clip_rect, const LLRectf& center_uv
|
|||
gGL.texCoord2f(center_uv_rect.mRight, clip_rect.mTop);
|
||||
gGL.vertex3fv((center_draw_rect.mRight * width_vec + height_vec).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(center_uv_rect.mLeft, center_uv_rect.mTop);
|
||||
gGL.vertex3fv((center_draw_rect.mLeft * width_vec + center_draw_rect.mTop * height_vec).mV);
|
||||
|
||||
gGL.texCoord2f(center_uv_rect.mRight, clip_rect.mTop);
|
||||
gGL.vertex3fv((center_draw_rect.mRight * width_vec + height_vec).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(center_uv_rect.mLeft, clip_rect.mTop);
|
||||
gGL.vertex3fv((center_draw_rect.mLeft * width_vec + height_vec).mV);
|
||||
|
||||
|
|
@ -1560,6 +2001,14 @@ void gl_segmented_rect_3d_tex(const LLRectf& clip_rect, const LLRectf& center_uv
|
|||
gGL.texCoord2f(clip_rect.mRight, clip_rect.mTop);
|
||||
gGL.vertex3fv((width_vec + height_vec).mV);
|
||||
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
gGL.texCoord2f(center_uv_rect.mRight, center_uv_rect.mTop);
|
||||
gGL.vertex3fv((center_draw_rect.mRight * width_vec + center_draw_rect.mTop * height_vec).mV);
|
||||
|
||||
gGL.texCoord2f(clip_rect.mRight, clip_rect.mTop);
|
||||
gGL.vertex3fv((width_vec + height_vec).mV);
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.texCoord2f(center_uv_rect.mRight, clip_rect.mTop);
|
||||
gGL.vertex3fv((center_draw_rect.mRight * width_vec + height_vec).mV);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -118,7 +118,8 @@ bool LLVertexBuffer::sMapped = false;
|
|||
bool LLVertexBuffer::sUseStreamDraw = true;
|
||||
bool LLVertexBuffer::sUseVAO = false;
|
||||
bool LLVertexBuffer::sPreferStreamDraw = false;
|
||||
|
||||
// <FS:Ansariel> Use a vbo for the static LLVertexBuffer::drawArray/Element functions; by Drake Arconis/Shyotl Kuhr
|
||||
LLVertexBuffer* LLVertexBuffer::sUtilityBuffer = NULL;
|
||||
|
||||
U32 LLVBOPool::genBuffer()
|
||||
{
|
||||
|
|
@ -368,7 +369,7 @@ U32 LLVertexBuffer::sGLMode[LLRender::NUM_MODES] =
|
|||
GL_POINTS,
|
||||
GL_LINES,
|
||||
GL_LINE_STRIP,
|
||||
GL_QUADS,
|
||||
//GL_QUADS, // <FS:Ansariel> Remove QUADS rendering mode
|
||||
GL_LINE_LOOP,
|
||||
};
|
||||
|
||||
|
|
@ -582,41 +583,76 @@ void LLVertexBuffer::drawArrays(U32 mode, const std::vector<LLVector3>& pos, con
|
|||
return;
|
||||
}
|
||||
|
||||
unbind();
|
||||
|
||||
setupClientArrays(MAP_VERTEX | MAP_NORMAL);
|
||||
// <FS:Ansariel> Use a vbo for the static LLVertexBuffer::drawArray/Element functions; by Drake Arconis/Shyotl Kuhr
|
||||
//unbind();
|
||||
//
|
||||
//setupClientArrays(MAP_VERTEX | MAP_NORMAL);
|
||||
|
||||
LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr;
|
||||
//LLGLSLShader* shader = LLGLSLShader::sCurBoundShaderPtr;
|
||||
|
||||
if (shader)
|
||||
//if (shader)
|
||||
//{
|
||||
// S32 loc = LLVertexBuffer::TYPE_VERTEX;
|
||||
// if (loc > -1)
|
||||
// {
|
||||
// glVertexAttribPointerARB(loc, 3, GL_FLOAT, GL_FALSE, 0, pos[0].mV);
|
||||
// }
|
||||
// loc = LLVertexBuffer::TYPE_NORMAL;
|
||||
// if (loc > -1)
|
||||
// {
|
||||
// glVertexAttribPointerARB(loc, 3, GL_FLOAT, GL_FALSE, 0, norm[0].mV);
|
||||
// }
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// glVertexPointer(3, GL_FLOAT, 0, pos[0].mV);
|
||||
// glNormalPointer(GL_FLOAT, 0, norm[0].mV);
|
||||
//}
|
||||
//LLGLSLShader::startProfile();
|
||||
//glDrawArrays(sGLMode[mode], 0, count);
|
||||
//LLGLSLShader::stopProfile(count, mode);
|
||||
if (!sUtilityBuffer)
|
||||
{
|
||||
S32 loc = LLVertexBuffer::TYPE_VERTEX;
|
||||
if (loc > -1)
|
||||
{
|
||||
glVertexAttribPointerARB(loc, 3, GL_FLOAT, GL_FALSE, 0, pos[0].mV);
|
||||
}
|
||||
loc = LLVertexBuffer::TYPE_NORMAL;
|
||||
if (loc > -1)
|
||||
{
|
||||
glVertexAttribPointerARB(loc, 3, GL_FLOAT, GL_FALSE, 0, norm[0].mV);
|
||||
}
|
||||
sUtilityBuffer = new LLVertexBuffer(MAP_VERTEX | MAP_NORMAL | MAP_TEXCOORD0, GL_STREAM_DRAW);
|
||||
sUtilityBuffer->allocateBuffer(count, count, true);
|
||||
}
|
||||
else
|
||||
if (sUtilityBuffer->getNumVerts() < (S32) count)
|
||||
{
|
||||
glVertexPointer(3, GL_FLOAT, 0, pos[0].mV);
|
||||
glNormalPointer(GL_FLOAT, 0, norm[0].mV);
|
||||
sUtilityBuffer->resizeBuffer(count, count);
|
||||
}
|
||||
|
||||
LLStrider<LLVector3> vertex_strider;
|
||||
LLStrider<LLVector3> normal_strider;
|
||||
sUtilityBuffer->getVertexStrider(vertex_strider);
|
||||
sUtilityBuffer->getNormalStrider(normal_strider);
|
||||
for (U32 i = 0; i < count; ++i)
|
||||
{
|
||||
*(vertex_strider++) = pos[i];
|
||||
*(normal_strider++) = norm[i];
|
||||
}
|
||||
|
||||
sUtilityBuffer->setBuffer(MAP_VERTEX | MAP_NORMAL);
|
||||
LLGLSLShader::startProfile();
|
||||
glDrawArrays(sGLMode[mode], 0, count);
|
||||
sUtilityBuffer->drawArrays(mode, 0, pos.size());
|
||||
LLGLSLShader::stopProfile(count, mode);
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
|
||||
//static
|
||||
void LLVertexBuffer::drawElements(U32 mode, const LLVector4a* pos, const LLVector2* tc, S32 num_indices, const U16* indicesp)
|
||||
// <FS:Ansariel> Use a vbo for the static LLVertexBuffer::drawArray/Element functions; by Drake Arconis/Shyotl Kuhr
|
||||
//void LLVertexBuffer::drawElements(U32 mode, const LLVector4a* pos, const LLVector2* tc, S32 num_indices, const U16* indicesp)
|
||||
void LLVertexBuffer::drawElements(U32 mode, const S32 num_vertices, const LLVector4a* pos, const LLVector2* tc, S32 num_indices, const U16* indicesp)
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
llassert(!LLGLSLShader::sNoFixedFunction || LLGLSLShader::sCurBoundShaderPtr != NULL);
|
||||
|
||||
// <FS:Ansariel> Crash fix due to invalid calls to drawElements by Drake Arconis
|
||||
if (num_vertices <= 0)
|
||||
{
|
||||
LL_WARNS() << "Called drawElements with 0 vertices" << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
|
||||
if (num_indices <= 0)
|
||||
{
|
||||
LL_WARNS() << "Called drawElements with 0 indices" << LL_ENDL;
|
||||
|
|
@ -626,36 +662,70 @@ void LLVertexBuffer::drawElements(U32 mode, const LLVector4a* pos, const LLVecto
|
|||
|
||||
gGL.syncMatrices();
|
||||
|
||||
// <FS:Ansariel> Use a vbo for the static LLVertexBuffer::drawArray/Element functions; by Drake Arconis/Shyotl Kuhr
|
||||
if (!sUtilityBuffer)
|
||||
{
|
||||
sUtilityBuffer = new LLVertexBuffer(MAP_VERTEX | MAP_NORMAL | MAP_TEXCOORD0, GL_STREAM_DRAW);
|
||||
sUtilityBuffer->allocateBuffer(num_vertices, num_indices, true);
|
||||
}
|
||||
if (sUtilityBuffer->getNumVerts() < num_vertices || sUtilityBuffer->getNumIndices() < num_indices)
|
||||
{
|
||||
sUtilityBuffer->resizeBuffer(llmax(sUtilityBuffer->getNumVerts(), num_vertices), llmax(sUtilityBuffer->getNumIndices(), num_indices));
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
U32 mask = LLVertexBuffer::MAP_VERTEX;
|
||||
// <FS:Ansariel> Use a vbo for the static LLVertexBuffer::drawArray/Element functions; by Drake Arconis/Shyotl Kuhr
|
||||
LLStrider<U16> index_strider;
|
||||
LLStrider<LLVector3> vertex_strider;
|
||||
sUtilityBuffer->getIndexStrider(index_strider);
|
||||
sUtilityBuffer->getVertexStrider(vertex_strider);
|
||||
const S32 index_size = ((num_indices * sizeof(U16)) + 0xF) & ~0xF;
|
||||
const S32 vertex_size = ((num_vertices * 4 * sizeof(F32)) + 0xF) & ~0xF;
|
||||
LLVector4a::memcpyNonAliased16((F32*)index_strider.get(), (F32*)indicesp, index_size);
|
||||
LLVector4a::memcpyNonAliased16((F32*)vertex_strider.get(), (F32*)pos, vertex_size);
|
||||
// </FS:Ansariel>
|
||||
if (tc)
|
||||
{
|
||||
mask = mask | LLVertexBuffer::MAP_TEXCOORD0;
|
||||
// <FS:Ansariel> Use a vbo for the static LLVertexBuffer::drawArray/Element functions; by Drake Arconis/Shyotl Kuhr
|
||||
LLStrider<LLVector2> tc_strider;
|
||||
sUtilityBuffer->getTexCoord0Strider(tc_strider);
|
||||
const S32 tc_size = ((num_vertices * 2 * sizeof(F32)) + 0xF) & ~0xF;
|
||||
LLVector4a::memcpyNonAliased16((F32*)tc_strider.get(), (F32*)tc, tc_size);
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
|
||||
unbind();
|
||||
|
||||
setupClientArrays(mask);
|
||||
// <FS:Ansariel> Use a vbo for the static LLVertexBuffer::drawArray/Element functions; by Drake Arconis/Shyotl Kuhr
|
||||
//unbind();
|
||||
//
|
||||
//setupClientArrays(mask);
|
||||
|
||||
if (LLGLSLShader::sNoFixedFunction)
|
||||
{
|
||||
S32 loc = LLVertexBuffer::TYPE_VERTEX;
|
||||
glVertexAttribPointerARB(loc, 3, GL_FLOAT, GL_FALSE, 16, pos);
|
||||
//if (LLGLSLShader::sNoFixedFunction)
|
||||
//{
|
||||
// S32 loc = LLVertexBuffer::TYPE_VERTEX;
|
||||
// glVertexAttribPointerARB(loc, 3, GL_FLOAT, GL_FALSE, 16, pos);
|
||||
|
||||
if (tc)
|
||||
{
|
||||
loc = LLVertexBuffer::TYPE_TEXCOORD0;
|
||||
glVertexAttribPointerARB(loc, 2, GL_FLOAT, GL_FALSE, 0, tc);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
glTexCoordPointer(2, GL_FLOAT, 0, tc);
|
||||
glVertexPointer(3, GL_FLOAT, 16, pos);
|
||||
}
|
||||
// if (tc)
|
||||
// {
|
||||
// loc = LLVertexBuffer::TYPE_TEXCOORD0;
|
||||
// glVertexAttribPointerARB(loc, 2, GL_FLOAT, GL_FALSE, 0, tc);
|
||||
// }
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// glTexCoordPointer(2, GL_FLOAT, 0, tc);
|
||||
// glVertexPointer(3, GL_FLOAT, 16, pos);
|
||||
//}
|
||||
|
||||
//LLGLSLShader::startProfile();
|
||||
//glDrawElements(sGLMode[mode], num_indices, GL_UNSIGNED_SHORT, indicesp);
|
||||
//LLGLSLShader::stopProfile(num_indices, mode);
|
||||
sUtilityBuffer->setBuffer(mask);
|
||||
LLGLSLShader::startProfile();
|
||||
glDrawElements(sGLMode[mode], num_indices, GL_UNSIGNED_SHORT, indicesp);
|
||||
sUtilityBuffer->draw(mode, num_indices, 0);
|
||||
LLGLSLShader::stopProfile(num_indices, mode);
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
|
||||
void LLVertexBuffer::validateRange(U32 start, U32 end, U32 count, U32 indices_offset) const
|
||||
|
|
@ -917,6 +987,11 @@ void LLVertexBuffer::cleanupClass()
|
|||
sDynamicVBOPool.cleanup();
|
||||
sDynamicCopyVBOPool.cleanup();
|
||||
|
||||
// <FS:Ansariel> Use a vbo for the static LLVertexBuffer::drawArray/Element functions; by Drake Arconis/Shyotl Kuhr
|
||||
delete sUtilityBuffer;
|
||||
sUtilityBuffer = NULL;
|
||||
// </FS:Ansariel>
|
||||
|
||||
if(sPrivatePoolp)
|
||||
{
|
||||
LLPrivateMemoryPoolManager::getInstance()->deletePool(sPrivatePoolp);
|
||||
|
|
@ -2137,15 +2212,26 @@ bool LLVertexBuffer::getWeightStrider(LLStrider<F32>& strider, S32 index, S32 co
|
|||
return VertexBufferStrider<F32,TYPE_WEIGHT>::get(*this, strider, index, count, map_range);
|
||||
}
|
||||
|
||||
bool LLVertexBuffer::getWeight4Strider(LLStrider<LLVector4>& strider, S32 index, S32 count, bool map_range)
|
||||
// <FS:Ansariel> Vectorized Weight4Strider and ClothWeightStrider by Drake Arconis
|
||||
//bool LLVertexBuffer::getWeight4Strider(LLStrider<LLVector4>& strider, S32 index, S32 count, bool map_range)
|
||||
//{
|
||||
// return VertexBufferStrider<LLVector4,TYPE_WEIGHT4>::get(*this, strider, index, count, map_range);
|
||||
//}
|
||||
//
|
||||
//bool LLVertexBuffer::getClothWeightStrider(LLStrider<LLVector4>& strider, S32 index, S32 count, bool map_range)
|
||||
//{
|
||||
// return VertexBufferStrider<LLVector4,TYPE_CLOTHWEIGHT>::get(*this, strider, index, count, map_range);
|
||||
//}
|
||||
bool LLVertexBuffer::getWeight4Strider(LLStrider<LLVector4a>& strider, S32 index, S32 count, bool map_range)
|
||||
{
|
||||
return VertexBufferStrider<LLVector4,TYPE_WEIGHT4>::get(*this, strider, index, count, map_range);
|
||||
return VertexBufferStrider<LLVector4a,TYPE_WEIGHT4>::get(*this, strider, index, count, map_range);
|
||||
}
|
||||
|
||||
bool LLVertexBuffer::getClothWeightStrider(LLStrider<LLVector4>& strider, S32 index, S32 count, bool map_range)
|
||||
bool LLVertexBuffer::getClothWeightStrider(LLStrider<LLVector4a>& strider, S32 index, S32 count, bool map_range)
|
||||
{
|
||||
return VertexBufferStrider<LLVector4,TYPE_CLOTHWEIGHT>::get(*this, strider, index, count, map_range);
|
||||
return VertexBufferStrider<LLVector4a,TYPE_CLOTHWEIGHT>::get(*this, strider, index, count, map_range);
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
|
|
@ -2274,9 +2360,12 @@ void LLVertexBuffer::setBuffer(U32 data_mask)
|
|||
{
|
||||
|
||||
U32 unsatisfied_mask = (required_mask & ~data_mask);
|
||||
U32 i = 0;
|
||||
// <FS:Ansariel> Infinite loop fix by Drake Arconis
|
||||
//U32 i = 0;
|
||||
|
||||
while (i < TYPE_MAX)
|
||||
//while (i < TYPE_MAX)
|
||||
for (U32 i = 0; i < TYPE_MAX; i++)
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
U32 unsatisfied_flag = unsatisfied_mask & (1 << i);
|
||||
switch (unsatisfied_flag)
|
||||
|
|
@ -2397,8 +2486,10 @@ void LLVertexBuffer::setBuffer(U32 data_mask)
|
|||
sGLRenderIndices = mGLIndices;
|
||||
}
|
||||
}
|
||||
|
||||
if (!mGLArray)
|
||||
// <FS:ND> Need to setup (activate/deactivate) client arrays with VAOs too
|
||||
// if( !mGLArray )
|
||||
if (!sUseVAO && !mGLArray)
|
||||
// </FS:ND>
|
||||
{
|
||||
setupClientArrays(data_mask);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -145,7 +145,9 @@ public:
|
|||
static void setupClientArrays(U32 data_mask);
|
||||
static void pushPositions(U32 mode, const LLVector4a* pos, U32 count);
|
||||
static void drawArrays(U32 mode, const std::vector<LLVector3>& pos, const std::vector<LLVector3>& norm);
|
||||
static void drawElements(U32 mode, const LLVector4a* pos, const LLVector2* tc, S32 num_indices, const U16* indicesp);
|
||||
// <FS:Ansariel> Use a vbo for the static LLVertexBuffer::drawArray/Element functions; by Drake Arconis/Shyotl Kuhr
|
||||
//static void drawElements(U32 mode, const LLVector4a* pos, const LLVector2* tc, S32 num_indices, const U16* indicesp);
|
||||
static void drawElements(U32 mode, const S32 num_vertices, const LLVector4a* pos, const LLVector2* tc, S32 num_indices, const U16* indicesp);
|
||||
|
||||
static void unbind(); //unbind any bound vertex buffer
|
||||
|
||||
|
|
@ -258,8 +260,12 @@ public:
|
|||
bool getTextureIndexStrider(LLStrider<LLColor4U>& strider, S32 index=0, S32 count = -1, bool map_range = false);
|
||||
bool getEmissiveStrider(LLStrider<LLColor4U>& strider, S32 index=0, S32 count = -1, bool map_range = false);
|
||||
bool getWeightStrider(LLStrider<F32>& strider, S32 index=0, S32 count = -1, bool map_range = false);
|
||||
bool getWeight4Strider(LLStrider<LLVector4>& strider, S32 index=0, S32 count = -1, bool map_range = false);
|
||||
bool getClothWeightStrider(LLStrider<LLVector4>& strider, S32 index=0, S32 count = -1, bool map_range = false);
|
||||
// <FS:Ansariel> Vectorized Weight4Strider and ClothWeightStrider by Drake Arconis
|
||||
//bool getWeight4Strider(LLStrider<LLVector4>& strider, S32 index=0, S32 count = -1, bool map_range = false);
|
||||
//bool getClothWeightStrider(LLStrider<LLVector4>& strider, S32 index=0, S32 count = -1, bool map_range = false);
|
||||
bool getWeight4Strider(LLStrider<LLVector4a>& strider, S32 index=0, S32 count = -1, bool map_range = false);
|
||||
bool getClothWeightStrider(LLStrider<LLVector4a>& strider, S32 index=0, S32 count = -1, bool map_range = false);
|
||||
// </FS:Ansariel>
|
||||
|
||||
|
||||
bool useVBOs() const;
|
||||
|
|
@ -355,6 +361,11 @@ public:
|
|||
static U32 sIndexCount;
|
||||
static U32 sBindCount;
|
||||
static U32 sSetCount;
|
||||
|
||||
// <FS:Ansariel> Use a vbo for the static LLVertexBuffer::drawArray/Element functions; by Drake Arconis/Shyotl Kuhr
|
||||
private:
|
||||
static LLVertexBuffer* sUtilityBuffer;
|
||||
// </FS:Ansariel>
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -202,16 +202,28 @@ void renderBadgeBackground(F32 centerX, F32 centerY, F32 width, F32 height, cons
|
|||
ll_round(y) + height);
|
||||
|
||||
LLVector3 vertices[4];
|
||||
vertices[0] = LLVector3(screen_rect.mRight, screen_rect.mTop, 1.0f);
|
||||
vertices[1] = LLVector3(screen_rect.mLeft, screen_rect.mTop, 1.0f);
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//vertices[0] = LLVector3(screen_rect.mRight, screen_rect.mTop, 1.0f);
|
||||
//vertices[1] = LLVector3(screen_rect.mLeft, screen_rect.mTop, 1.0f);
|
||||
//vertices[2] = LLVector3(screen_rect.mLeft, screen_rect.mBottom, 1.0f);
|
||||
//vertices[3] = LLVector3(screen_rect.mRight, screen_rect.mBottom, 1.0f);
|
||||
//
|
||||
//gGL.begin(LLRender::QUADS);
|
||||
//{
|
||||
// gGL.vertexBatchPreTransformed(vertices, 4);
|
||||
//}
|
||||
//gGL.end();
|
||||
vertices[0] = LLVector3(screen_rect.mLeft, screen_rect.mTop, 1.0f);
|
||||
vertices[1] = LLVector3(screen_rect.mRight, screen_rect.mTop, 1.0f);
|
||||
vertices[2] = LLVector3(screen_rect.mLeft, screen_rect.mBottom, 1.0f);
|
||||
vertices[3] = LLVector3(screen_rect.mRight, screen_rect.mBottom, 1.0f);
|
||||
|
||||
gGL.begin(LLRender::QUADS);
|
||||
gGL.begin(LLRender::TRIANGLE_STRIP);
|
||||
{
|
||||
gGL.vertexBatchPreTransformed(vertices, 4);
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.popUIMatrix();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,9 +58,6 @@ public:
|
|||
|
||||
virtual void deselect() {};
|
||||
virtual BOOL canDeselect() const { return FALSE; }
|
||||
|
||||
virtual void duplicate() {};
|
||||
virtual BOOL canDuplicate() const { return FALSE; }
|
||||
|
||||
// TODO: Instead of being a public data member, it would be better to hide it altogether
|
||||
// and have a "set" method and then a bunch of static versions of the cut, copy, paste
|
||||
|
|
|
|||
|
|
@ -3364,6 +3364,12 @@ BOOL LLMenuBarGL::handleAcceleratorKey(KEY key, MASK mask)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
if (result && !getHighlightedItem() && LLMenuGL::sMenuContainer->hasVisibleMenu())
|
||||
{
|
||||
// close menus originating from other menu bars
|
||||
LLMenuGL::sMenuContainer->hideMenus();
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2010,12 +2010,12 @@ BOOL LLScrollListCtrl::handleRightMouseDown(S32 x, S32 y, MASK mask)
|
|||
registrar.add("Url.ShowProfile", boost::bind(&LLScrollListCtrl::showProfile, id, is_group));
|
||||
registrar.add("Url.SendIM", boost::bind(&LLScrollListCtrl::sendIM, id));
|
||||
registrar.add("Url.AddFriend", boost::bind(&LLScrollListCtrl::addFriend, id));
|
||||
registrar.add("Url.RemoveFriend", boost::bind(&LLScrollListCtrl::removeFriend, id));
|
||||
registrar.add("Url.Execute", boost::bind(&LLScrollListCtrl::showNameDetails, id, is_group));
|
||||
registrar.add("Url.CopyLabel", boost::bind(&LLScrollListCtrl::copyNameToClipboard, id, is_group));
|
||||
registrar.add("Url.CopyUrl", boost::bind(&LLScrollListCtrl::copySLURLToClipboard, id, is_group));
|
||||
|
||||
// <FS:Ansariel> Additional convenience options
|
||||
registrar.add("Url.RemoveFriend", boost::bind(&LLScrollListCtrl::removeFriend, id));
|
||||
registrar.add("FS.ZoomIn", boost::bind(&LLUrlAction::executeSLURL, "secondlife:///app/firestorm/" + id + "/zoom", true));
|
||||
registrar.add("FS.TeleportToTarget", boost::bind(&LLUrlAction::executeSLURL, "secondlife:///app/firestorm/" + id + "/teleportto", true));
|
||||
registrar.add("FS.OfferTeleport", boost::bind(&LLUrlAction::executeSLURL, "secondlife:///app/firestorm/" + id + "/offerteleport", true));
|
||||
|
|
@ -2082,14 +2082,11 @@ void LLScrollListCtrl::addFriend(std::string id)
|
|||
LLUrlAction::addFriend(slurl);
|
||||
}
|
||||
|
||||
// <FS:Ansariel> Add remove friend option
|
||||
void LLScrollListCtrl::removeFriend(std::string id)
|
||||
{
|
||||
// add resident to friends list
|
||||
std::string slurl = "secondlife:///app/agent/" + id + "/about";
|
||||
LLUrlAction::removeFriend(slurl);
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
|
||||
void LLScrollListCtrl::showNameDetails(std::string id, bool is_group)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -462,9 +462,7 @@ private:
|
|||
static void showProfile(std::string id, bool is_group);
|
||||
static void sendIM(std::string id);
|
||||
static void addFriend(std::string id);
|
||||
// <FS:Ansariel> Add remove friend option
|
||||
static void removeFriend(std::string id);
|
||||
// </FS:Ansariel>
|
||||
static void showNameDetails(std::string id, bool is_group);
|
||||
static void copyNameToClipboard(std::string id, bool is_group);
|
||||
static void copySLURLToClipboard(std::string id, bool is_group);
|
||||
|
|
|
|||
|
|
@ -519,7 +519,10 @@ void LLStatBar::draw()
|
|||
max_value = 0.f;
|
||||
|
||||
gGL.color4f(1.f, 0.f, 0.f, 1.f);
|
||||
gGL.begin( LLRender::QUADS );
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//gGL.begin( LLRender::QUADS );
|
||||
gGL.begin( LLRender::TRIANGLES );
|
||||
// </FS:Ansariel>
|
||||
const S32 max_frame = llmin(num_frames, num_values);
|
||||
U32 num_samples = 0;
|
||||
for (S32 i = 1; i <= max_frame; i++)
|
||||
|
|
@ -559,17 +562,35 @@ void LLStatBar::draw()
|
|||
F32 max = llmax(min + 1, (max_value - mCurMinBar) * value_scale);
|
||||
if (mOrientation == HORIZONTAL)
|
||||
{
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//gGL.vertex2f((F32)bar_rect.mRight - offset, max);
|
||||
//gGL.vertex2f((F32)bar_rect.mRight - offset, min);
|
||||
//gGL.vertex2f((F32)bar_rect.mRight - offset - 1, min);
|
||||
//gGL.vertex2f((F32)bar_rect.mRight - offset - 1, max);
|
||||
gGL.vertex2f((F32)bar_rect.mRight - offset, max);
|
||||
gGL.vertex2f((F32)bar_rect.mRight - offset, min);
|
||||
gGL.vertex2f((F32)bar_rect.mRight - offset - 1, min);
|
||||
|
||||
gGL.vertex2f((F32)bar_rect.mRight - offset, max);
|
||||
gGL.vertex2f((F32)bar_rect.mRight - offset - 1, min);
|
||||
gGL.vertex2f((F32)bar_rect.mRight - offset - 1, max);
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
else
|
||||
{
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//gGL.vertex2f(min, (F32)bar_rect.mBottom + offset + 1);
|
||||
//gGL.vertex2f(min, (F32)bar_rect.mBottom + offset);
|
||||
//gGL.vertex2f(max, (F32)bar_rect.mBottom + offset);
|
||||
//gGL.vertex2f(max, (F32)bar_rect.mBottom + offset + 1 );
|
||||
gGL.vertex2f(min, (F32)bar_rect.mBottom + offset + 1);
|
||||
gGL.vertex2f(min, (F32)bar_rect.mBottom + offset);
|
||||
gGL.vertex2f(max, (F32)bar_rect.mBottom + offset);
|
||||
|
||||
gGL.vertex2f(min, (F32)bar_rect.mBottom + offset + 1);
|
||||
gGL.vertex2f(max, (F32)bar_rect.mBottom + offset);
|
||||
gGL.vertex2f(max, (F32)bar_rect.mBottom + offset + 1 );
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
}
|
||||
gGL.end();
|
||||
|
|
|
|||
|
|
@ -1617,8 +1617,8 @@ void LLTextBase::reflow()
|
|||
segment_set_t::iterator seg_iter = mSegments.begin();
|
||||
S32 seg_offset = 0;
|
||||
S32 line_start_index = 0;
|
||||
const S32 text_available_width = mVisibleTextRect.getWidth() - mHPad; // reserve room for margin
|
||||
S32 remaining_pixels = text_available_width;
|
||||
const F32 text_available_width = mVisibleTextRect.getWidth() - mHPad; // reserve room for margin
|
||||
F32 remaining_pixels = text_available_width;
|
||||
S32 line_count = 0;
|
||||
|
||||
// find and erase line info structs starting at start_index and going to end of document
|
||||
|
|
@ -1644,14 +1644,15 @@ void LLTextBase::reflow()
|
|||
S32 cur_index = segment->getStart() + seg_offset;
|
||||
|
||||
// ask segment how many character fit in remaining space
|
||||
S32 character_count = segment->getNumChars(getWordWrap() ? llmax(0, remaining_pixels) : S32_MAX,
|
||||
S32 character_count = segment->getNumChars(getWordWrap() ? llmax(0, ll_round(remaining_pixels)) : S32_MAX,
|
||||
seg_offset,
|
||||
cur_index - line_start_index,
|
||||
S32_MAX,
|
||||
line_count - seg_line_offset);
|
||||
|
||||
S32 segment_width, segment_height;
|
||||
bool force_newline = segment->getDimensions(seg_offset, character_count, segment_width, segment_height);
|
||||
F32 segment_width;
|
||||
S32 segment_height;
|
||||
bool force_newline = segment->getDimensionsF32(seg_offset, character_count, segment_width, segment_height);
|
||||
// grow line height as necessary based on reported height of this segment
|
||||
line_height = llmax(line_height, segment_height);
|
||||
remaining_pixels -= segment_width;
|
||||
|
|
@ -1660,11 +1661,13 @@ void LLTextBase::reflow()
|
|||
|
||||
S32 last_segment_char_on_line = segment->getStart() + seg_offset;
|
||||
|
||||
S32 text_actual_width = text_available_width - remaining_pixels;
|
||||
// Note: make sure text will fit in width - use ceil, but also make sure
|
||||
// ceil is used only once per line
|
||||
S32 text_actual_width = llceil(text_available_width - remaining_pixels);
|
||||
S32 text_left = getLeftOffset(text_actual_width);
|
||||
LLRect line_rect(text_left,
|
||||
cur_top,
|
||||
text_left + text_actual_width,
|
||||
text_left + text_actual_width,
|
||||
cur_top - line_height);
|
||||
|
||||
// if we didn't finish the current segment...
|
||||
|
|
@ -3304,7 +3307,15 @@ boost::signals2::connection LLTextBase::setIsObjectBlockedCallback(const is_bloc
|
|||
LLTextSegment::~LLTextSegment()
|
||||
{}
|
||||
|
||||
bool LLTextSegment::getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const { width = 0; height = 0; return false;}
|
||||
bool LLTextSegment::getDimensionsF32(S32 first_char, S32 num_chars, F32& width, S32& height) const { width = 0; height = 0; return false; }
|
||||
bool LLTextSegment::getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const
|
||||
{
|
||||
F32 fwidth = 0;
|
||||
bool result = getDimensionsF32(first_char, num_chars, fwidth, height);
|
||||
width = ll_round(fwidth);
|
||||
return result;
|
||||
}
|
||||
|
||||
S32 LLTextSegment::getOffset(S32 segment_local_x_coord, S32 start_offset, S32 num_chars, bool round) const { return 0; }
|
||||
S32 LLTextSegment::getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars, S32 line_ind) const { return 0; }
|
||||
void LLTextSegment::updateLayout(const LLTextBase& editor) {}
|
||||
|
|
@ -3552,7 +3563,7 @@ void LLNormalTextSegment::setToolTip(const std::string& tooltip)
|
|||
mTooltip = tooltip;
|
||||
}
|
||||
|
||||
bool LLNormalTextSegment::getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const
|
||||
bool LLNormalTextSegment::getDimensionsF32(S32 first_char, S32 num_chars, F32& width, S32& height) const
|
||||
{
|
||||
height = 0;
|
||||
width = 0;
|
||||
|
|
@ -3561,7 +3572,7 @@ bool LLNormalTextSegment::getDimensions(S32 first_char, S32 num_chars, S32& widt
|
|||
height = mFontHeight;
|
||||
const LLWString &text = getWText();
|
||||
// if last character is a newline, then return true, forcing line break
|
||||
width = mStyle->getFont()->getWidth(text.c_str(), mStart + first_char, num_chars);
|
||||
width = mStyle->getFont()->getWidthF32(text.c_str(), mStart + first_char, num_chars);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
@ -3742,7 +3753,7 @@ LLInlineViewSegment::~LLInlineViewSegment()
|
|||
mView->die();
|
||||
}
|
||||
|
||||
bool LLInlineViewSegment::getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const
|
||||
bool LLInlineViewSegment::getDimensionsF32(S32 first_char, S32 num_chars, F32& width, S32& height) const
|
||||
{
|
||||
if (first_char == 0 && num_chars == 0)
|
||||
{
|
||||
|
|
@ -3829,7 +3840,7 @@ LLLineBreakTextSegment::LLLineBreakTextSegment(LLStyleConstSP style,S32 pos):LLT
|
|||
LLLineBreakTextSegment::~LLLineBreakTextSegment()
|
||||
{
|
||||
}
|
||||
bool LLLineBreakTextSegment::getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const
|
||||
bool LLLineBreakTextSegment::getDimensionsF32(S32 first_char, S32 num_chars, F32& width, S32& height) const
|
||||
{
|
||||
width = 0;
|
||||
height = mFontHeight;
|
||||
|
|
@ -3858,7 +3869,7 @@ LLImageTextSegment::~LLImageTextSegment()
|
|||
|
||||
static const S32 IMAGE_HPAD = 3;
|
||||
|
||||
bool LLImageTextSegment::getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const
|
||||
bool LLImageTextSegment::getDimensionsF32(S32 first_char, S32 num_chars, F32& width, S32& height) const
|
||||
{
|
||||
width = 0;
|
||||
height = mStyle->getFont()->getLineHeight();
|
||||
|
|
|
|||
|
|
@ -61,8 +61,9 @@ public:
|
|||
mEnd(end)
|
||||
{}
|
||||
virtual ~LLTextSegment();
|
||||
bool getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const;
|
||||
|
||||
virtual bool getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const;
|
||||
virtual bool getDimensionsF32(S32 first_char, S32 num_chars, F32& width, S32& height) const;
|
||||
virtual S32 getOffset(S32 segment_local_x_coord, S32 start_offset, S32 num_chars, bool round) const;
|
||||
|
||||
/**
|
||||
|
|
@ -126,7 +127,7 @@ public:
|
|||
LLNormalTextSegment( const LLColor4& color, S32 start, S32 end, LLTextBase& editor, BOOL is_visible = TRUE);
|
||||
virtual ~LLNormalTextSegment();
|
||||
|
||||
/*virtual*/ bool getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const;
|
||||
/*virtual*/ bool getDimensionsF32(S32 first_char, S32 num_chars, F32& width, S32& height) const;
|
||||
/*virtual*/ S32 getOffset(S32 segment_local_x_coord, S32 start_offset, S32 num_chars, bool round) const;
|
||||
/*virtual*/ S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars, S32 line_ind) const;
|
||||
/*virtual*/ F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect);
|
||||
|
|
@ -212,7 +213,7 @@ public:
|
|||
|
||||
LLInlineViewSegment(const Params& p, S32 start, S32 end);
|
||||
~LLInlineViewSegment();
|
||||
/*virtual*/ bool getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const;
|
||||
/*virtual*/ bool getDimensionsF32(S32 first_char, S32 num_chars, F32& width, S32& height) const;
|
||||
/*virtual*/ S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars, S32 line_ind) const;
|
||||
/*virtual*/ void updateLayout(const class LLTextBase& editor);
|
||||
/*virtual*/ F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect);
|
||||
|
|
@ -236,7 +237,7 @@ public:
|
|||
LLLineBreakTextSegment(LLStyleConstSP style,S32 pos);
|
||||
LLLineBreakTextSegment(S32 pos);
|
||||
~LLLineBreakTextSegment();
|
||||
bool getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const;
|
||||
/*virtual*/ bool getDimensionsF32(S32 first_char, S32 num_chars, F32& width, S32& height) const;
|
||||
S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars, S32 line_ind) const;
|
||||
F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect);
|
||||
|
||||
|
|
@ -249,7 +250,7 @@ class LLImageTextSegment : public LLTextSegment
|
|||
public:
|
||||
LLImageTextSegment(LLStyleConstSP style,S32 pos,class LLTextBase& editor);
|
||||
~LLImageTextSegment();
|
||||
bool getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const;
|
||||
/*virtual*/ bool getDimensionsF32(S32 first_char, S32 num_chars, F32& width, S32& height) const;
|
||||
S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 char_offset, S32 max_chars, S32 line_ind) const;
|
||||
F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect);
|
||||
|
||||
|
|
|
|||
|
|
@ -1558,6 +1558,10 @@ void LLTextEditor::pasteHelper(bool is_primary)
|
|||
// Clean up string (replace tabs and remove characters that our fonts don't support).
|
||||
void LLTextEditor::cleanStringForPaste(LLWString & clean_string)
|
||||
{
|
||||
std::string clean_string_utf = wstring_to_utf8str(clean_string);
|
||||
std::replace( clean_string_utf.begin(), clean_string_utf.end(), '\r', '\n');
|
||||
clean_string = utf8str_to_wstring(clean_string_utf);
|
||||
|
||||
LLWStringUtil::replaceTabsWithSpaces(clean_string, SPACES_PER_TAB);
|
||||
if( mAllowEmbeddedItems )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -310,6 +310,7 @@ set(viewer_SOURCE_FILES
|
|||
llfloaterautoreplacesettings.cpp
|
||||
llfloateravatar.cpp
|
||||
llfloateravatarpicker.cpp
|
||||
llfloateravatarrendersettings.cpp
|
||||
llfloateravatartextures.cpp
|
||||
llfloaterbeacons.cpp
|
||||
llfloaterbigpreview.cpp
|
||||
|
|
@ -343,6 +344,7 @@ set(viewer_SOURCE_FILES
|
|||
llfloatergesture.cpp
|
||||
llfloatergodtools.cpp
|
||||
llfloatergotoline.cpp
|
||||
llfloatergridstatus.cpp
|
||||
llfloatergroupbulkban.cpp
|
||||
llfloatergroupinvite.cpp
|
||||
llfloatergroups.cpp
|
||||
|
|
@ -1058,6 +1060,7 @@ set(viewer_HEADER_FILES
|
|||
llfloaterautoreplacesettings.h
|
||||
llfloateravatar.h
|
||||
llfloateravatarpicker.h
|
||||
llfloateravatarrendersettings.h
|
||||
llfloateravatartextures.h
|
||||
llfloaterbeacons.h
|
||||
llfloaterbigpreview.h
|
||||
|
|
@ -1091,6 +1094,7 @@ set(viewer_HEADER_FILES
|
|||
llfloatergesture.h
|
||||
llfloatergodtools.h
|
||||
llfloatergotoline.h
|
||||
llfloatergridstatus.h
|
||||
llfloatergroupbulkban.h
|
||||
llfloatergroupinvite.h
|
||||
llfloatergroups.h
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
5.0.4
|
||||
5.0.5
|
||||
|
|
|
|||
|
|
@ -240,7 +240,7 @@ void AnimationExplorer::draw()
|
|||
|
||||
gGL.color3f(1.0f, 1.0f, 1.0f);
|
||||
gGL.getTexUnit(0)->bind(mAnimationPreview);
|
||||
gGL.begin(LLRender::QUADS);
|
||||
gGL.begin(LLRender::TRIANGLES);
|
||||
{
|
||||
gGL.texCoord2f(0.0f, 1.0f);
|
||||
gGL.vertex2i(r.mLeft, r.mTop);
|
||||
|
|
@ -248,6 +248,11 @@ void AnimationExplorer::draw()
|
|||
gGL.vertex2i(r.mLeft, r.mBottom);
|
||||
gGL.texCoord2f(1.0f, 0.0f);
|
||||
gGL.vertex2i(r.mRight, r.mBottom);
|
||||
|
||||
gGL.texCoord2f(0.0f, 1.0f);
|
||||
gGL.vertex2i(r.mLeft, r.mTop);
|
||||
gGL.texCoord2f(1.0f, 0.0f);
|
||||
gGL.vertex2i(r.mRight, r.mBottom);
|
||||
gGL.texCoord2f(1.0f, 1.0f);
|
||||
gGL.vertex2i(r.mRight, r.mTop);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -295,6 +295,17 @@
|
|||
is_running_function="Floater.IsOpen"
|
||||
is_running_parameters="reporter"
|
||||
/>
|
||||
<command name="gridstatus"
|
||||
available_in_toybox="true"
|
||||
is_flashing_allowed="true"
|
||||
icon="Command_Grid_Status_Icon"
|
||||
label_ref="Command_Grid_Status_Label"
|
||||
tooltip_ref="Command_Grid_Status_Tooltip"
|
||||
execute_function="Floater.ToggleOrBringToFront"
|
||||
execute_parameters="grid_status"
|
||||
is_running_function="Floater.IsOpen"
|
||||
is_running_parameters="grid_status"
|
||||
/>
|
||||
|
||||
<!-- Firestorm command buttons -->
|
||||
<command name="voice"
|
||||
|
|
|
|||
|
|
@ -7300,6 +7300,39 @@
|
|||
<key>Backup</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>GridStatusRSS</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>URL that points to SL Grid Status RSS</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>String</string>
|
||||
<key>Value</key>
|
||||
<string>https://secondlife-status.statuspage.io/history.atom</string>
|
||||
</map>
|
||||
<key>GridStatusUpdateDelay</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Timer delay for updating Grid Status RSS.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>F32</string>
|
||||
<key>Value</key>
|
||||
<real>60.0</real>
|
||||
</map>
|
||||
<key>TestGridStatusRSSFromFile</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>For testing only: Don't update rss xml file from server.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>LagMeterShrunk</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -10819,6 +10852,17 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<key>Value</key>
|
||||
<integer>1</integer>
|
||||
</map>
|
||||
<key>AlwaysRenderFriends</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Always render friends regardless of max complexity</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<integer>0</integer>
|
||||
</map>
|
||||
<key>RenderAvatar</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
@ -19044,6 +19088,22 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<integer>0</integer>
|
||||
</array>
|
||||
</map>
|
||||
<key>GridStatusFloaterRect</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Web profile floater dimensions</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Rect</string>
|
||||
<key>Value</key>
|
||||
<array>
|
||||
<integer>0</integer>
|
||||
<integer>520</integer>
|
||||
<integer>625</integer>
|
||||
<integer>0</integer>
|
||||
</array>
|
||||
</map>
|
||||
<key>HelpFloaterOpen</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
|
|||
|
|
@ -33,7 +33,9 @@ uniform float minimum_alpha;
|
|||
|
||||
uniform sampler2D diffuseMap;
|
||||
|
||||
#if !DEPTH_CLAMP // <FS> Fix void and region water flickr by Drake Arconis (Alchemy viewer)
|
||||
VARYING vec4 post_pos;
|
||||
#endif // <FS> Fix void and region water flickr by Drake Arconis (Alchemy viewer)
|
||||
VARYING vec2 vary_texcoord0;
|
||||
|
||||
void main()
|
||||
|
|
@ -47,5 +49,7 @@ void main()
|
|||
|
||||
frag_color = vec4(1,1,1,1);
|
||||
|
||||
#if !DEPTH_CLAMP // <FS> Fix void and region water flickr by Drake Arconis (Alchemy viewer)
|
||||
gl_FragDepth = max(post_pos.z/post_pos.w*0.5+0.5, 0.0);
|
||||
#endif // <FS> Fix void and region water flickr by Drake Arconis (Alchemy viewer)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,9 @@ uniform mat4 modelview_projection_matrix;
|
|||
ATTRIBUTE vec3 position;
|
||||
ATTRIBUTE vec2 texcoord0;
|
||||
|
||||
#if !DEPTH_CLAMP // <FS> Fix void and region water flickr by Drake Arconis (Alchemy viewer)
|
||||
VARYING vec4 post_pos;
|
||||
#endif // <FS> Fix void and region water flickr by Drake Arconis (Alchemy viewer)
|
||||
VARYING vec2 vary_texcoord0;
|
||||
|
||||
void main()
|
||||
|
|
@ -37,9 +39,15 @@ void main()
|
|||
//transform vertex
|
||||
vec4 pos = modelview_projection_matrix*vec4(position.xyz, 1.0);
|
||||
|
||||
#if !DEPTH_CLAMP // <FS> Fix void and region water flickr by Drake Arconis (Alchemy viewer)
|
||||
post_pos = pos;
|
||||
|
||||
gl_Position = vec4(pos.x, pos.y, pos.w*0.5, pos.w);
|
||||
// <FS> Fix void and region water flickr by Drake Arconis (Alchemy viewer)
|
||||
#else
|
||||
gl_Position = pos;
|
||||
#endif
|
||||
// </FS> Fix void and region water flickr by Drake Arconis (Alchemy viewer)
|
||||
|
||||
vary_texcoord0 = (texture_matrix0 * vec4(texcoord0,0,1)).xy;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -526,6 +526,16 @@ void invrepair()
|
|||
gInventory.collectDescendents(gInventory.getRootFolderID(), cats, items, FALSE);
|
||||
}
|
||||
|
||||
void key_to_name_callback(const LLUUID& id, const LLAvatarName& av_name)
|
||||
{
|
||||
std::string name = av_name.getCompleteName();
|
||||
if (!RlvActions::canShowName(RlvActions::SNC_DEFAULT, id))
|
||||
{
|
||||
name = RlvStrings::getAnonym(name);
|
||||
}
|
||||
report_to_nearby_chat(llformat("%s: (%s)", id.asString().c_str(), name.c_str()));
|
||||
}
|
||||
|
||||
bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_gesture)
|
||||
{
|
||||
static LLCachedControl<bool> sFSCmdLine(gSavedSettings, "FSCmdLine");
|
||||
|
|
@ -701,13 +711,7 @@ bool cmd_line_chat(const std::string& revised_text, EChatType type, bool from_ge
|
|||
LLUUID target_key;
|
||||
if (i >> target_key)
|
||||
{
|
||||
std::string object_name;
|
||||
gCacheName->getFullName(target_key, object_name);
|
||||
if (!RlvActions::canShowName(RlvActions::SNC_DEFAULT, target_key))
|
||||
{
|
||||
object_name = RlvStrings::getAnonym(object_name);
|
||||
}
|
||||
report_to_nearby_chat(llformat("%s: (%s)", target_key.asString().c_str(), object_name.c_str()));
|
||||
LLAvatarNameCache::get(target_key, boost::bind(&key_to_name_callback, _1, _2));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -744,8 +744,8 @@ bool DAESaver::saveDAE(std::string filename)
|
|||
|
||||
// File creator
|
||||
std::string author = "Unknown";
|
||||
if (gCacheName)
|
||||
gCacheName->getFullName(gAgentID, author);
|
||||
if (!gAgentUsername.empty())
|
||||
author = gAgentUsername;
|
||||
|
||||
daeElement* contributor = asset->add("contributor");
|
||||
contributor->add("author")->setCharData(author);
|
||||
|
|
|
|||
|
|
@ -71,10 +71,15 @@ void exoPostProcess::ExodusRenderPostUpdate()
|
|||
etc1.setVec(0.f, 0.f);
|
||||
etc2.setVec((F32) gPipeline.mScreen.getWidth(),
|
||||
(F32) gPipeline.mScreen.getHeight());
|
||||
initVB();
|
||||
}
|
||||
|
||||
void exoPostProcess::initVB()
|
||||
{
|
||||
if (!gPipeline.sRenderDeferred)
|
||||
{
|
||||
// Destroy our old buffer, and create a new vertex buffer for the screen (shamelessly ganked from pipeline.cpp).
|
||||
mExoPostBuffer = NULL;
|
||||
destroyVB();
|
||||
mExoPostBuffer = new LLVertexBuffer(LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0 | LLVertexBuffer::MAP_TEXCOORD1, 0);
|
||||
mExoPostBuffer->allocateBuffer(3,0,TRUE);
|
||||
|
||||
|
|
@ -102,7 +107,7 @@ void exoPostProcess::ExodusRenderPostUpdate()
|
|||
}
|
||||
else
|
||||
{
|
||||
mExoPostBuffer = NULL;
|
||||
destroyVB();
|
||||
mExoPostBuffer = new LLVertexBuffer(LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_TEXCOORD0 | LLVertexBuffer::MAP_TEXCOORD1, 0);
|
||||
mExoPostBuffer->allocateBuffer(8, 0, true);
|
||||
|
||||
|
|
@ -119,6 +124,11 @@ void exoPostProcess::ExodusRenderPostUpdate()
|
|||
}
|
||||
}
|
||||
|
||||
void exoPostProcess::destroyVB()
|
||||
{
|
||||
mExoPostBuffer = NULL;
|
||||
}
|
||||
|
||||
void exoPostProcess::ExodusRenderPost(LLRenderTarget* src, LLRenderTarget* dst, S32 type)
|
||||
{
|
||||
if (type == EXODUS_RENDER_VIGNETTE_POST)
|
||||
|
|
@ -188,3 +198,4 @@ void exoShader::BindRenderTarget(LLRenderTarget* tgt, LLGLSLShader* shader, S32
|
|||
}
|
||||
shader->uniform2f(sScreen_Res, tgt->getWidth(), tgt->getHeight());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,36 +43,41 @@ private:
|
|||
static exoPostProcess *postProcess;
|
||||
|
||||
public:
|
||||
enum ExodusRenderPostType
|
||||
{
|
||||
//EXODUS_RENDER_GAMMA_POST = 1,
|
||||
//EXODUS_RENDER_GAMMA_PRE = 2,
|
||||
//EXODUS_RENDER_COLOR_GRADE = 4,
|
||||
//EXODUS_RENDER_TONE_LINEAR = 8,
|
||||
//EXODUS_RENDER_TONE_REINHARD = 10,
|
||||
//EXODUS_RENDER_TONE_FILMIC = 20,
|
||||
//EXODUS_RENDER_COLOR_GRADE_LEGACY = 40,
|
||||
EXODUS_RENDER_VIGNETTE_POST = 80,
|
||||
//EXODUS_RENDER_TONE_FILMIC_ADV = 100
|
||||
};
|
||||
enum ExodusRenderPostType
|
||||
{
|
||||
//EXODUS_RENDER_GAMMA_POST = 1,
|
||||
//EXODUS_RENDER_GAMMA_PRE = 2,
|
||||
//EXODUS_RENDER_COLOR_GRADE = 4,
|
||||
//EXODUS_RENDER_TONE_LINEAR = 8,
|
||||
//EXODUS_RENDER_TONE_REINHARD = 10,
|
||||
//EXODUS_RENDER_TONE_FILMIC = 20,
|
||||
//EXODUS_RENDER_COLOR_GRADE_LEGACY = 40,
|
||||
EXODUS_RENDER_VIGNETTE_POST = 80,
|
||||
//EXODUS_RENDER_TONE_FILMIC_ADV = 100
|
||||
};
|
||||
|
||||
void ExodusSetPostAttribute(U32 attribute, void* value = NULL);
|
||||
void ExodusRenderPostStack(LLRenderTarget* src, LLRenderTarget* dst);
|
||||
void ExodusRenderPost(LLRenderTarget* src, LLRenderTarget* dst, S32 type);
|
||||
void ExodusRenderVignette(LLRenderTarget* src, LLRenderTarget* dst);
|
||||
void ExodusRenderPostUpdate();
|
||||
void ExodusRenderPost(LLRenderTarget* src, LLRenderTarget* dst, S32 type);
|
||||
void ExodusRenderVignette(LLRenderTarget* src, LLRenderTarget* dst);
|
||||
void ExodusRenderPostUpdate();
|
||||
void ExodusRenderPostSettingsUpdate();
|
||||
|
||||
BOOL multisample;
|
||||
U32 mGammaFunc;
|
||||
|
||||
void initVB();
|
||||
void destroyVB();
|
||||
|
||||
BOOL multisample;
|
||||
U32 mGammaFunc;
|
||||
U32 mInvGammaFunc;
|
||||
|
||||
private:
|
||||
LLVector2 etc1;
|
||||
LLVector2 etc2;
|
||||
LLVector2 etc1;
|
||||
LLVector2 etc2;
|
||||
LLPointer<LLVertexBuffer> mExoPostBuffer;
|
||||
|
||||
protected:
|
||||
LLRenderTarget mTex2DTargetBuffer; // Need this for texture2Dlod functionality.
|
||||
|
||||
public:
|
||||
// Cached settings.
|
||||
static LLVector3 sExodusRenderVignette;
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ WLSkyDetail 1 128
|
|||
Disregard128DefaultDrawDistance 1 1
|
||||
Disregard96DefaultDrawDistance 1 1
|
||||
RenderTextureMemoryMultiple 1 1.0
|
||||
RenderCompressTextures 1 0
|
||||
RenderCompressTextures 1 1
|
||||
RenderShaderLightingMaxLevel 1 3
|
||||
RenderDeferred 1 1
|
||||
RenderDeferredSSAO 1 1
|
||||
|
|
@ -360,8 +360,8 @@ RenderVBOEnable 1 1
|
|||
//
|
||||
// VRAM > 512MB
|
||||
//
|
||||
//list VRAMGT512
|
||||
//RenderCompressTextures 1 0
|
||||
list VRAMGT512
|
||||
RenderCompressTextures 1 0
|
||||
|
||||
//
|
||||
// No Pixel Shaders available
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ WLSkyDetail 1 128
|
|||
Disregard128DefaultDrawDistance 1 1
|
||||
Disregard96DefaultDrawDistance 1 1
|
||||
RenderTextureMemoryMultiple 1 1.0
|
||||
RenderCompressTextures 1 0
|
||||
RenderCompressTextures 1 1
|
||||
RenderShaderLightingMaxLevel 1 3
|
||||
RenderDeferred 1 1
|
||||
RenderDeferredSSAO 1 1
|
||||
|
|
@ -359,8 +359,8 @@ RenderVBOEnable 1 1
|
|||
//
|
||||
// VRAM > 512MB
|
||||
//
|
||||
//list VRAMGT512
|
||||
//RenderCompressTextures 1 0
|
||||
list VRAMGT512
|
||||
RenderCompressTextures 1 0
|
||||
|
||||
//
|
||||
// No Pixel Shaders available
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ WLSkyDetail 1 128
|
|||
Disregard128DefaultDrawDistance 1 1
|
||||
Disregard96DefaultDrawDistance 1 1
|
||||
RenderTextureMemoryMultiple 1 1.0
|
||||
RenderCompressTextures 1 0
|
||||
RenderCompressTextures 1 1
|
||||
RenderShaderLightingMaxLevel 1 3
|
||||
RenderDeferred 1 1
|
||||
RenderDeferredSSAO 1 1
|
||||
|
|
@ -386,8 +386,8 @@ RenderShadowDetail 0 0
|
|||
//
|
||||
// VRAM > 512MB
|
||||
//
|
||||
//list VRAMGT512
|
||||
//RenderCompressTextures 1 0
|
||||
list VRAMGT512
|
||||
RenderCompressTextures 1 0
|
||||
|
||||
//
|
||||
// "Default" setups for safe, low, medium, high
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@
|
|||
|
||||
#include "fsareasearch.h"
|
||||
|
||||
#include "llavatarnamecache.h"
|
||||
#include "llscrolllistctrl.h"
|
||||
#include "lllineeditor.h"
|
||||
#include "lltextbox.h"
|
||||
|
|
@ -1076,17 +1077,41 @@ void FSAreaSearch::updateObjectCosts(const LLUUID& object_id, F32 object_cost, F
|
|||
|
||||
void FSAreaSearch::getNameFromUUID(LLUUID& id, std::string& name, BOOL group, bool& name_requested)
|
||||
{
|
||||
BOOL is_group;
|
||||
|
||||
if(!gCacheName->getIfThere(id, name, is_group))
|
||||
if (group)
|
||||
{
|
||||
if(std::find(mNamesRequested.begin(), mNamesRequested.end(), id) == mNamesRequested.end())
|
||||
BOOL is_group;
|
||||
if(!gCacheName->getIfThere(id, name, is_group))
|
||||
{
|
||||
mNamesRequested.push_back(id);
|
||||
gCacheName->get(id, group, boost::bind(&FSAreaSearch::callbackLoadFullName, this, _1, _2));
|
||||
if(std::find(mNamesRequested.begin(), mNamesRequested.end(), id) == mNamesRequested.end())
|
||||
{
|
||||
mNamesRequested.push_back(id);
|
||||
gCacheName->get(id, group, boost::bind(&FSAreaSearch::callbackLoadFullName, this, _1, _2));
|
||||
}
|
||||
name_requested = true;
|
||||
}
|
||||
name_requested = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
LLAvatarName av_name;
|
||||
if (LLAvatarNameCache::get(id, &av_name))
|
||||
{
|
||||
name = av_name.getUserName();
|
||||
}
|
||||
else
|
||||
{
|
||||
if(std::find(mNamesRequested.begin(), mNamesRequested.end(), id) == mNamesRequested.end())
|
||||
{
|
||||
mNamesRequested.push_back(id);
|
||||
LLAvatarNameCache::get(id, boost::bind(&FSAreaSearch::avatarNameCacheCallback, this, _1, _2));
|
||||
}
|
||||
name_requested = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void FSAreaSearch::avatarNameCacheCallback(const LLUUID& id, const LLAvatarName& av_name)
|
||||
{
|
||||
callbackLoadFullName(id, av_name.getUserName());
|
||||
}
|
||||
|
||||
void FSAreaSearch::callbackLoadFullName(const LLUUID& id, const std::string& full_name)
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@
|
|||
#include <boost/regex.hpp>
|
||||
#include "llscrolllistcolumn.h"
|
||||
|
||||
class LLAvatarName;
|
||||
class LLTextBox;
|
||||
class LLViewerRegion;
|
||||
class LLCheckBoxCtrl;
|
||||
|
|
@ -112,6 +113,7 @@ public:
|
|||
virtual void draw();
|
||||
virtual void onOpen(const LLSD& key);
|
||||
|
||||
void avatarNameCacheCallback(const LLUUID& id, const LLAvatarName& av_name);
|
||||
void callbackLoadFullName(const LLUUID& id, const std::string& full_name);
|
||||
void processObjectProperties(LLMessageSystem* msg);
|
||||
void updateObjectCosts(const LLUUID& object_id, F32 object_cost, F32 link_cost, F32 physics_cost, F32 link_physics_cost);
|
||||
|
|
|
|||
|
|
@ -39,7 +39,9 @@ LLContextMenu* FSBlockListMenu::createMenu()
|
|||
LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar;
|
||||
|
||||
registrar.add("Block.Action", boost::bind(&FSBlockListMenu::onContextMenuItemClick, this, _2));
|
||||
enable_registrar.add("Block.Check", boost::bind(&FSBlockListMenu::onContextMenuItemCheck, this, _2));
|
||||
enable_registrar.add("Block.Enable", boost::bind(&FSBlockListMenu::onContextMenuItemEnable, this, _2));
|
||||
enable_registrar.add("Block.Visible", boost::bind(&FSBlockListMenu::onContextMenuItemVisible, this, _2));
|
||||
|
||||
return createFromFile("menu_fs_block_list.xml");
|
||||
}
|
||||
|
|
@ -62,6 +64,20 @@ void FSBlockListMenu::onContextMenuItemClick(const LLSD& userdata)
|
|||
}
|
||||
}
|
||||
|
||||
bool FSBlockListMenu::onContextMenuItemCheck(const LLSD& userdata)
|
||||
{
|
||||
if (mSpawningCtrl)
|
||||
{
|
||||
FSPanelBlockList* blocklist = mSpawningCtrl->getParentByType<FSPanelBlockList>();
|
||||
if (blocklist)
|
||||
{
|
||||
return blocklist->isActionChecked(userdata);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool FSBlockListMenu::onContextMenuItemEnable(const LLSD& userdata)
|
||||
{
|
||||
if (mSpawningCtrl)
|
||||
|
|
@ -75,3 +91,17 @@ bool FSBlockListMenu::onContextMenuItemEnable(const LLSD& userdata)
|
|||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool FSBlockListMenu::onContextMenuItemVisible(const LLSD& userdata)
|
||||
{
|
||||
if (mSpawningCtrl)
|
||||
{
|
||||
FSPanelBlockList* blocklist = mSpawningCtrl->getParentByType<FSPanelBlockList>();
|
||||
if (blocklist)
|
||||
{
|
||||
return blocklist->isActionVisible(userdata);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,9 @@ public:
|
|||
|
||||
private:
|
||||
void onContextMenuItemClick(const LLSD& userdata);
|
||||
bool onContextMenuItemCheck(const LLSD& userdata);
|
||||
bool onContextMenuItemEnable(const LLSD& userdata);
|
||||
bool onContextMenuItemVisible(const LLSD& userdata);
|
||||
|
||||
LLView* mSpawningCtrl;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -306,9 +306,9 @@ public:
|
|||
void mute(const LLUUID& participant_id, U32 flags)
|
||||
{
|
||||
BOOL is_muted = LLMuteList::getInstance()->isMuted(participant_id, flags);
|
||||
std::string name;
|
||||
gCacheName->getFullName(participant_id, name);
|
||||
LLMute mute(participant_id, name, LLMute::AGENT);
|
||||
LLAvatarName av_name;
|
||||
LLAvatarNameCache::get(participant_id, &av_name);
|
||||
LLMute mute(participant_id, av_name.getUserName(), LLMute::AGENT);
|
||||
|
||||
if (!is_muted)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -86,6 +86,18 @@ FSData::FSData() :
|
|||
mFSDataURL = mBaseURL + "/" + "data.xml";
|
||||
}
|
||||
|
||||
FSData::~FSData()
|
||||
{
|
||||
for (avatar_name_cache_connection_map_t::iterator it = mAvatarNameCacheConnections.begin(); it != mAvatarNameCacheConnections.end(); ++it)
|
||||
{
|
||||
if (it->second.connected())
|
||||
{
|
||||
it->second.disconnect();
|
||||
}
|
||||
}
|
||||
mAvatarNameCacheConnections.clear();
|
||||
}
|
||||
|
||||
void FSData::processResponder(const LLSD& content, const std::string& url, bool save_to_file, const LLDate& last_modified)
|
||||
{
|
||||
if (url == mFSDataURL)
|
||||
|
|
@ -783,6 +795,21 @@ bool FSData::isAgentFlag(const LLUUID& agent_id, flags_t flag)
|
|||
return (iter->second & flag);
|
||||
}
|
||||
|
||||
void FSData::onNameCache(const LLUUID& av_id, const LLAvatarName& av_name)
|
||||
{
|
||||
avatar_name_cache_connection_map_t::iterator it = mAvatarNameCacheConnections.find(av_id);
|
||||
if (it != mAvatarNameCacheConnections.end())
|
||||
{
|
||||
if (it->second.connected())
|
||||
{
|
||||
it->second.disconnect();
|
||||
}
|
||||
mAvatarNameCacheConnections.erase(it);
|
||||
}
|
||||
LLMute mute(av_id, av_name.getUserName(), LLMute::EXTERNAL);
|
||||
LLMuteList::getInstance()->add(mute);
|
||||
}
|
||||
|
||||
// this is called in two different places due to can recieved .xml before gCacheName is created and vice versa.
|
||||
void FSData::addAgents()
|
||||
{
|
||||
|
|
@ -796,10 +823,18 @@ void FSData::addAgents()
|
|||
if (iter->second & NO_SPAM)
|
||||
{
|
||||
LLUUID id = iter->first;
|
||||
std::string name;
|
||||
gCacheName->getFullName(id, name);
|
||||
LLMute mute(id, name, LLMute::EXTERNAL);
|
||||
LLMuteList::getInstance()->add(mute);
|
||||
avatar_name_cache_connection_map_t::iterator it = mAvatarNameCacheConnections.find(id);
|
||||
if (it != mAvatarNameCacheConnections.end())
|
||||
{
|
||||
if (it->second.connected())
|
||||
{
|
||||
it->second.disconnect();
|
||||
}
|
||||
mAvatarNameCacheConnections.erase(it);
|
||||
}
|
||||
|
||||
LLAvatarNameCache::callback_connection_t cb = LLAvatarNameCache::get(id, boost::bind(&FSData::onNameCache, this, _1, _2));
|
||||
mAvatarNameCacheConnections.insert(std::make_pair(id, cb));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,12 +30,14 @@
|
|||
|
||||
#include "llinstantmessage.h"
|
||||
#include "llsingleton.h"
|
||||
#include "llavatarnamecache.h"
|
||||
|
||||
class FSData : public LLSingleton<FSData>
|
||||
{
|
||||
LOG_CLASS(FSData);
|
||||
|
||||
LLSINGLETON(FSData);
|
||||
virtual ~FSData();
|
||||
|
||||
public:
|
||||
|
||||
|
|
@ -90,6 +92,7 @@ private:
|
|||
void processData(const LLSD& fs_data);
|
||||
void processClientTags(const LLSD& tags);
|
||||
void updateClientTagsLocal();
|
||||
void onNameCache(const LLUUID& av_id, const LLAvatarName& av_name);
|
||||
|
||||
std::map<LLUUID, S32> mSupportAgents;
|
||||
std::map<std::string, LLSD> mBlockedVersions;
|
||||
|
|
@ -114,6 +117,9 @@ private:
|
|||
bool mLegacySearch;
|
||||
bool mFSDataDone;
|
||||
bool mAgentsDone;
|
||||
|
||||
typedef std::map<LLUUID, boost::signals2::connection> avatar_name_cache_connection_map_t;
|
||||
avatar_name_cache_connection_map_t mAvatarNameCacheConnections;
|
||||
};
|
||||
|
||||
#endif // FS_DATA_H
|
||||
|
|
|
|||
|
|
@ -300,8 +300,9 @@ bool FSFloaterObjectExport::exportSelection()
|
|||
mTextureChecked.clear();
|
||||
|
||||
std::string author = "Unknown";
|
||||
if (gCacheName)
|
||||
gCacheName->getFullName(gAgentID, author);
|
||||
if (!gAgentUsername.empty())
|
||||
author = gAgentUsername;
|
||||
|
||||
time_t rawtime;
|
||||
time(&rawtime);
|
||||
struct tm* utc_time = gmtime(&rawtime);
|
||||
|
|
|
|||
|
|
@ -564,8 +564,8 @@ void FSFloaterNearbyChat::loadHistory()
|
|||
}
|
||||
|
||||
std::string legacy_name = gCacheName->buildLegacyName(from);
|
||||
gCacheName->getUUID(legacy_name, from_id);
|
||||
}
|
||||
from_id = LLAvatarNameCache::findIdByName(legacy_name);
|
||||
}
|
||||
|
||||
LLChat chat;
|
||||
chat.mFromName = from;
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@
|
|||
#include "fsnearbychatcontrol.h"
|
||||
#include "llagent.h" // gAgent
|
||||
#include "llanimationstates.h" // ANIM_AGENT_WHISPER, ANIM_AGENT_TALK, ANIM_AGENT_SHOUT
|
||||
#include "llavatarnamecache.h"
|
||||
#include "llchatentry.h"
|
||||
#include "llcommandhandler.h"
|
||||
#include "llgesturemgr.h"
|
||||
|
|
@ -752,8 +753,10 @@ void FSNearbyChat::handleChatBarKeystroke(LLUICtrl* source, S32 channel /* = 0 *
|
|||
// Look for a match
|
||||
while (iter != avatar_ids.end() && !found)
|
||||
{
|
||||
if (gCacheName->getFullName(*iter++, name))
|
||||
LLAvatarName av_name;
|
||||
if (LLAvatarNameCache::get(*iter++, &av_name))
|
||||
{
|
||||
name = av_name.getUserName();
|
||||
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
|
||||
{
|
||||
name = RlvStrings::getAnonym(name);
|
||||
|
|
@ -778,8 +781,10 @@ void FSNearbyChat::handleChatBarKeystroke(LLUICtrl* source, S32 channel /* = 0 *
|
|||
// Look for a match
|
||||
while (iter != avatar_ids.end() && !found)
|
||||
{
|
||||
if (gCacheName->getFullName(*iter++, name))
|
||||
LLAvatarName av_name;
|
||||
if (LLAvatarNameCache::get(*iter++, &av_name))
|
||||
{
|
||||
name = av_name.getUserName();
|
||||
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
|
||||
{
|
||||
name = RlvStrings::getAnonym(name);
|
||||
|
|
@ -794,7 +799,16 @@ void FSNearbyChat::handleChatBarKeystroke(LLUICtrl* source, S32 channel /* = 0 *
|
|||
if (found)
|
||||
{
|
||||
std::string first_name, last_name;
|
||||
gCacheName->getFirstLastName(*(iter - 1), first_name, last_name);
|
||||
LLAvatarName av_name;
|
||||
LLAvatarNameCache::get(*(iter - 1), &av_name);
|
||||
std::string username = av_name.getLegacyName();
|
||||
size_t delim_pos = username.find(' ');
|
||||
first_name = username.substr(0, delim_pos);
|
||||
if (delim_pos + 1 < username.length())
|
||||
{
|
||||
last_name = username.substr(delim_pos + 1, std::string::npos);
|
||||
}
|
||||
|
||||
std::string rest_of_match;
|
||||
std::string replaced_text;
|
||||
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ FSPanelBlockList::FSPanelBlockList()
|
|||
mCommitCallbackRegistrar.add("Block.Action", boost::bind(&FSPanelBlockList::onCustomAction, this, _2));
|
||||
mEnableCallbackRegistrar.add("Block.Check", boost::bind(&FSPanelBlockList::isActionChecked, this, _2));
|
||||
mEnableCallbackRegistrar.add("Block.Enable", boost::bind(&FSPanelBlockList::isActionEnabled, this, _2));
|
||||
mEnableCallbackRegistrar.add("Block.Visible", boost::bind(&FSPanelBlockList::isActionVisible, this, _2));
|
||||
}
|
||||
|
||||
void FSPanelBlockList::removePicker()
|
||||
|
|
@ -92,7 +93,7 @@ BOOL FSPanelBlockList::postBuild()
|
|||
mBlockedList->setDoubleClickCallback(boost::bind(&FSPanelBlockList::showProfile, this));
|
||||
mBlockedList->setSearchColumn(mBlockedList->getColumn("item_name")->mIndex);
|
||||
mBlockedList->setContextMenu(&gFSBlockListMenu);
|
||||
mBlockedList->setFilterColumn(0);
|
||||
mBlockedList->setFilterColumn(COL_NAME);
|
||||
mBlockedList->setSortChangedCallback(boost::bind(&FSPanelBlockList::onSortChanged, this));
|
||||
|
||||
getChild<LLButton>("unblock_btn")->setCommitCallback(boost::bind(&FSPanelBlockList::removeMutes, this));
|
||||
|
|
@ -210,8 +211,8 @@ void FSPanelBlockList::removeMutes()
|
|||
std::vector<LLScrollListItem*> selected_items = mBlockedList->getAllSelected();
|
||||
for (std::vector<LLScrollListItem*>::iterator it = selected_items.begin(); it != selected_items.end(); it++)
|
||||
{
|
||||
std::string name = (*it)->getColumn(0)->getValue().asString();
|
||||
LLUUID id = (*it)->getColumn(3)->getValue().asUUID();
|
||||
std::string name = (*it)->getColumn(COL_NAME)->getValue().asString();
|
||||
LLUUID id = (*it)->getColumn(COL_UUID)->getValue().asUUID();
|
||||
LLMute mute(id, name);
|
||||
LLMuteList::getInstance()->remove(mute);
|
||||
}
|
||||
|
|
@ -273,49 +274,129 @@ void FSPanelBlockList::onCustomAction(const LLSD& userdata)
|
|||
{
|
||||
showProfile();
|
||||
}
|
||||
else if ("block_voice" == command_name)
|
||||
{
|
||||
toggleMute(LLMute::flagVoiceChat);
|
||||
}
|
||||
else if ("block_text" == command_name)
|
||||
{
|
||||
toggleMute(LLMute::flagTextChat);
|
||||
}
|
||||
else if ("block_particles" == command_name)
|
||||
{
|
||||
toggleMute(LLMute::flagParticles);
|
||||
}
|
||||
else if ("block_obj_sounds" == command_name)
|
||||
{
|
||||
toggleMute(LLMute::flagObjectSounds);
|
||||
}
|
||||
}
|
||||
|
||||
bool FSPanelBlockList::isActionChecked(const LLSD& userdata)
|
||||
{
|
||||
std::string item = userdata.asString();
|
||||
std::string command_name = userdata.asString();
|
||||
U32 sort_order = gSavedSettings.getU32("BlockPeopleSortOrder");
|
||||
|
||||
if ("sort_by_name" == item)
|
||||
if ("sort_by_name" == command_name)
|
||||
{
|
||||
return E_SORT_BY_NAME_ASC == sort_order;
|
||||
}
|
||||
else if ("sort_by_type" == item)
|
||||
else if ("sort_by_type" == command_name)
|
||||
{
|
||||
return E_SORT_BY_TYPE_ASC == sort_order;
|
||||
}
|
||||
else if ("sort_by_name_desc" == item)
|
||||
else if ("sort_by_name_desc" == command_name)
|
||||
{
|
||||
return E_SORT_BY_NAME_DESC == sort_order;
|
||||
}
|
||||
else if ("sort_by_type_desc" == item)
|
||||
else if ("sort_by_type_desc" == command_name)
|
||||
{
|
||||
return E_SORT_BY_TYPE_DESC == sort_order;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!mBlockedList->getFirstSelected())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
LLUUID blocked_id = mBlockedList->getFirstSelected()->getColumn(COL_UUID)->getValue().asUUID();
|
||||
|
||||
if ("block_voice" == command_name)
|
||||
{
|
||||
return LLMuteList::getInstance()->isMuted(blocked_id, LLMute::flagVoiceChat);
|
||||
}
|
||||
else if ("block_text" == command_name)
|
||||
{
|
||||
return LLMuteList::getInstance()->isMuted(blocked_id, LLMute::flagTextChat);
|
||||
}
|
||||
else if ("block_particles" == command_name)
|
||||
{
|
||||
return LLMuteList::getInstance()->isMuted(blocked_id, LLMute::flagParticles);
|
||||
}
|
||||
else if ("block_obj_sounds" == command_name)
|
||||
{
|
||||
return LLMuteList::getInstance()->isMuted(blocked_id, LLMute::flagObjectSounds);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool FSPanelBlockList::isActionEnabled(const LLSD& userdata)
|
||||
{
|
||||
std::string item = userdata.asString();
|
||||
if ("unblock_item" == item)
|
||||
std::string command_name = userdata.asString();
|
||||
if ("unblock_item" == command_name)
|
||||
{
|
||||
return (mBlockedList->getNumSelected() > 0);
|
||||
}
|
||||
else if ("profile_item" == item)
|
||||
else if ("profile_item" == command_name
|
||||
|| "block_voice" == command_name
|
||||
|| "block_text" == command_name
|
||||
|| "block_particles" == command_name
|
||||
|| "block_obj_sounds" == command_name)
|
||||
{
|
||||
return (mBlockedList->getNumSelected() == 1 &&
|
||||
(LLMute::EType)mBlockedList->getFirstSelected()->getColumn(2)->getValue().asInteger() == LLMute::AGENT);
|
||||
(LLMute::EType)mBlockedList->getFirstSelected()->getColumn(COL_TYPE)->getValue().asInteger() == LLMute::AGENT);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool FSPanelBlockList::isActionVisible(const LLSD& userdata)
|
||||
{
|
||||
const std::string command_name = userdata.asString();
|
||||
|
||||
if ("block_voice" == command_name
|
||||
|| "block_text" == command_name
|
||||
|| "block_particles" == command_name
|
||||
|| "block_obj_sounds" == command_name)
|
||||
{
|
||||
return mBlockedList->getNumSelected() == 1 && (LLMute::AGENT == (LLMute::EType)mBlockedList->getFirstSelected()->getColumn(COL_TYPE)->getValue().asInteger());
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void FSPanelBlockList::toggleMute(U32 flags)
|
||||
{
|
||||
LLScrollListItem* item = mBlockedList->getFirstSelected();
|
||||
if (!item)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
LLMute mute(item->getColumn(COL_UUID)->getValue().asUUID(), item->getColumn(COL_NAME)->getValue().asString(), (LLMute::EType)item->getColumn(COL_TYPE)->getValue().asInteger());
|
||||
|
||||
if (!LLMuteList::getInstance()->isMuted(item->getColumn(COL_UUID)->getValue().asUUID(), flags))
|
||||
{
|
||||
LLMuteList::getInstance()->add(mute, flags);
|
||||
}
|
||||
else
|
||||
{
|
||||
LLMuteList::getInstance()->remove(mute, flags);
|
||||
}
|
||||
}
|
||||
|
||||
void FSPanelBlockList::blockResidentByName()
|
||||
{
|
||||
|
|
@ -350,9 +431,9 @@ void FSPanelBlockList::onSelectionChanged()
|
|||
void FSPanelBlockList::showProfile()
|
||||
{
|
||||
if (mBlockedList->getNumSelected() == 1 &&
|
||||
(LLMute::EType)mBlockedList->getFirstSelected()->getColumn(2)->getValue().asInteger() == LLMute::AGENT)
|
||||
(LLMute::EType)mBlockedList->getFirstSelected()->getColumn(COL_TYPE)->getValue().asInteger() == LLMute::AGENT)
|
||||
{
|
||||
LLAvatarActions::showProfile(mBlockedList->getFirstSelected()->getColumn(3)->getValue().asUUID());
|
||||
LLAvatarActions::showProfile(mBlockedList->getFirstSelected()->getColumn(COL_UUID)->getValue().asUUID());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -65,13 +65,24 @@ public:
|
|||
/* virtual */ void onChange() { refreshBlockedList();}
|
||||
|
||||
private:
|
||||
typedef enum e_sort_oder{
|
||||
typedef enum e_sort_oder
|
||||
{
|
||||
E_SORT_BY_NAME_ASC = 0,
|
||||
E_SORT_BY_TYPE_ASC = 1,
|
||||
E_SORT_BY_NAME_DESC = 2,
|
||||
E_SORT_BY_TYPE_DESC = 3
|
||||
} ESortOrder;
|
||||
|
||||
|
||||
typedef enum e_column_names
|
||||
{
|
||||
COL_NAME = 0,
|
||||
COL_TYPENAME,
|
||||
COL_TYPE,
|
||||
COL_UUID
|
||||
} EColumnNames;
|
||||
|
||||
|
||||
void refreshBlockedList();
|
||||
void updateButtons();
|
||||
void removePicker();
|
||||
|
|
@ -82,6 +93,7 @@ private:
|
|||
void blockResidentByName();
|
||||
void blockObjectByName();
|
||||
void showProfile();
|
||||
void toggleMute(U32 flags);
|
||||
|
||||
void onSelectionChanged();
|
||||
void onFilterEdit(std::string search_string);
|
||||
|
|
@ -90,6 +102,7 @@ private:
|
|||
void onCustomAction(const LLSD& userdata);
|
||||
bool isActionChecked(const LLSD& userdata);
|
||||
bool isActionEnabled(const LLSD& userdata);
|
||||
bool isActionVisible(const LLSD& userdata);
|
||||
|
||||
void callbackBlockPicked(const uuid_vec_t& ids, const std::vector<LLAvatarName> names);
|
||||
void callbackBlockByName(const std::string& text);
|
||||
|
|
|
|||
|
|
@ -589,8 +589,9 @@ void FSPanelProfileSecondLife::unfreeze()
|
|||
|
||||
void FSPanelProfileSecondLife::csr()
|
||||
{
|
||||
std::string name;
|
||||
gCacheName->getFullName(getAvatarId(), name);
|
||||
LLAvatarName av_name;
|
||||
LLAvatarNameCache::get(getAvatarId(), &av_name);
|
||||
std::string name = av_name.getUserName();
|
||||
LLAvatarActions::csr(getAvatarId(), name);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ void lggBeamColorMapFloater::draw()
|
|||
{
|
||||
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
LLGLEnable(GL_CULL_FACE);
|
||||
gGL.begin(LLRender::QUADS);
|
||||
gGL.begin(LLRender::TRIANGLE_STRIP);
|
||||
{
|
||||
F32 r = bColor.mV[0];
|
||||
F32 g = bColor.mV[1];
|
||||
|
|
@ -74,31 +74,24 @@ void lggBeamColorMapFloater::draw()
|
|||
|
||||
gGL.color4f(r, g, b, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(swatch_rect.mLeft, swatch_rect.mTop);
|
||||
gGL.color4f(r, g, b, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
gGL.color4f(r, g, b, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(swatch_rect.mRight, swatch_rect.mTop);
|
||||
gGL.color4f(r, g, b, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mTop);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
|
||||
gGL.color4f(r, g, b, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(swatch_rect.mRight, swatch_rect.mBottom);
|
||||
gGL.color4f(r, g, b, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
gGL.color4f(r, g, b, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(swatch_rect.mLeft, swatch_rect.mBottom);
|
||||
gGL.color4f(r, g, b, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
gGL.color4f(r, g, b, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(swatch_rect.mLeft, swatch_rect.mTop);
|
||||
|
||||
gGL.color4f(r, g, b, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mTop);
|
||||
gGL.color4f(r, g, b, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(swatch_rect.mRight, swatch_rect.mTop);
|
||||
gGL.vertex2i(swatch_rect.mRight, swatch_rect.mBottom);
|
||||
|
||||
gGL.color4f(r, g, b, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
gGL.color4f(r, g, b, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(swatch_rect.mRight, swatch_rect.mBottom);
|
||||
gGL.vertex2i(swatch_rect.mLeft, swatch_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
}
|
||||
gGL.end();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,35 +43,28 @@ void lggBeamMapFloater::draw()
|
|||
{
|
||||
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
LLGLEnable(GL_CULL_FACE);
|
||||
gGL.begin(LLRender::QUADS);
|
||||
gGL.begin(LLRender::TRIANGLE_STRIP);
|
||||
{
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(swatch_rect.mLeft, swatch_rect.mTop);
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(swatch_rect.mRight, swatch_rect.mTop);
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mTop);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(swatch_rect.mRight, swatch_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(swatch_rect.mLeft, swatch_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(swatch_rect.mLeft, swatch_rect.mTop);
|
||||
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mTop);
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(swatch_rect.mRight, swatch_rect.mTop);
|
||||
gGL.vertex2i(swatch_rect.mRight, swatch_rect.mBottom);
|
||||
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_OUT_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, CONTEXT_CONE_IN_ALPHA * mContextConeOpacity);
|
||||
gGL.vertex2i(swatch_rect.mRight, swatch_rect.mBottom);
|
||||
gGL.vertex2i(swatch_rect.mLeft, swatch_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
}
|
||||
gGL.end();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2059,7 +2059,7 @@ void LLAgent::stopAutoPilot(BOOL user_cancel)
|
|||
if (user_cancel && !mAutoPilotBehaviorName.empty())
|
||||
{
|
||||
if (mAutoPilotBehaviorName == "Sit")
|
||||
LLNotificationsUtil::add("CancelledSit");
|
||||
LL_INFOS("Agent") << "Autopilot-Sit was canceled by user action" << LL_ENDL;
|
||||
else if (mAutoPilotBehaviorName == "Attach")
|
||||
LLNotificationsUtil::add("CancelledAttach");
|
||||
else
|
||||
|
|
|
|||
|
|
@ -1607,6 +1607,14 @@ LLVector3d LLAgentCamera::calcFocusPositionTargetGlobal()
|
|||
}
|
||||
else if (mCameraMode == CAMERA_MODE_CUSTOMIZE_AVATAR)
|
||||
{
|
||||
if (mFocusOnAvatar)
|
||||
{
|
||||
LLVector3 focus_target = isAgentAvatarValid()
|
||||
? gAgentAvatarp->mHeadp->getWorldPosition()
|
||||
: gAgent.getPositionAgent();
|
||||
LLVector3d focus_target_global = gAgent.getPosGlobalFromAgent(focus_target);
|
||||
mFocusTargetGlobal = focus_target_global;
|
||||
}
|
||||
return mFocusTargetGlobal;
|
||||
}
|
||||
else if (!mFocusOnAvatar)
|
||||
|
|
|
|||
|
|
@ -661,7 +661,10 @@ static void settings_to_globals()
|
|||
LLSurface::setTextureSize(gSavedSettings.getU32("RegionTextureSize"));
|
||||
|
||||
LLRender::sGLCoreProfile = gSavedSettings.getBOOL("RenderGLCoreProfile");
|
||||
LLVertexBuffer::sUseVAO = gSavedSettings.getBOOL("RenderUseVAO");
|
||||
// <FS:Ansariel> Vertex Array Objects are required in OpenGL core profile
|
||||
//LLVertexBuffer::sUseVAO = gSavedSettings.getBOOL("RenderUseVAO");
|
||||
LLVertexBuffer::sUseVAO = LLRender::sGLCoreProfile ? TRUE : gSavedSettings.getBOOL("RenderUseVAO");
|
||||
// </FS:Ansariel>
|
||||
LLImageGL::sGlobalUseAnisotropic = gSavedSettings.getBOOL("RenderAnisotropic");
|
||||
LLImageGL::sCompressTextures = gSavedSettings.getBOOL("RenderCompressTextures");
|
||||
LLVOVolume::sLODFactor = gSavedSettings.getF32("RenderVolumeLODFactor");
|
||||
|
|
@ -3937,7 +3940,12 @@ LLSD LLAppViewer::getViewerInfo() const
|
|||
// http://wiki.phoenixviewer.com/firestorm_change_log_x.y.z.rev
|
||||
//if (! LLStringUtil::endsWith(url, "/"))
|
||||
// url += "/";
|
||||
//url += LLURI::escape(LLVersionInfo::getChannel()) + "/";
|
||||
//std::string channel = LLVersionInfo::getChannel();
|
||||
//if (LLStringUtil::endsWith(boost::to_lower_copy(channel), " edu")) // Release Notes url shouldn't include the EDU parameter
|
||||
//{
|
||||
// boost::erase_tail(channel, 4);
|
||||
//}
|
||||
//url += LLURI::escape(channel) + "/";
|
||||
// </FS:Ansariel>
|
||||
url += LLURI::escape(LLVersionInfo::getVersion());
|
||||
|
||||
|
|
@ -6479,6 +6487,8 @@ void LLAppViewer::forceErrorBreakpoint()
|
|||
LL_WARNS() << "Forcing a deliberate breakpoint" << LL_ENDL;
|
||||
#ifdef LL_WINDOWS
|
||||
DebugBreak();
|
||||
#else
|
||||
asm ("int $3");
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -645,15 +645,14 @@ void LLAvatarActions::kick(const LLUUID& id)
|
|||
// static
|
||||
void LLAvatarActions::freezeAvatar(const LLUUID& id)
|
||||
{
|
||||
std::string fullname;
|
||||
gCacheName->getFullName(id, fullname);
|
||||
LLAvatarName av_name;
|
||||
LLSD payload;
|
||||
payload["avatar_id"] = id;
|
||||
|
||||
if (!fullname.empty())
|
||||
if (LLAvatarNameCache::get(id, &av_name))
|
||||
{
|
||||
LLSD args;
|
||||
args["AVATAR_NAME"] = fullname;
|
||||
args["AVATAR_NAME"] = av_name.getUserName();
|
||||
LLNotificationsUtil::add("FreezeAvatarFullname", args, payload, handleFreezeAvatar);
|
||||
}
|
||||
else
|
||||
|
|
@ -665,15 +664,15 @@ void LLAvatarActions::freezeAvatar(const LLUUID& id)
|
|||
// static
|
||||
void LLAvatarActions::ejectAvatar(const LLUUID& id, bool ban_enabled)
|
||||
{
|
||||
std::string fullname;
|
||||
gCacheName->getFullName(id, fullname);
|
||||
LLAvatarName av_name;
|
||||
LLSD payload;
|
||||
payload["avatar_id"] = id;
|
||||
payload["ban_enabled"] = ban_enabled;
|
||||
LLSD args;
|
||||
if (!fullname.empty())
|
||||
bool has_name = LLAvatarNameCache::get(id, &av_name);
|
||||
if (has_name)
|
||||
{
|
||||
args["AVATAR_NAME"] = fullname;
|
||||
args["AVATAR_NAME"] = av_name.getUserName();
|
||||
}
|
||||
|
||||
if (ban_enabled)
|
||||
|
|
@ -682,7 +681,7 @@ void LLAvatarActions::ejectAvatar(const LLUUID& id, bool ban_enabled)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (!fullname.empty())
|
||||
if (has_name)
|
||||
{
|
||||
LLNotificationsUtil::add("EjectAvatarFullnameNoBan", args, payload, handleEjectAvatar);
|
||||
}
|
||||
|
|
@ -1229,10 +1228,10 @@ bool LLAvatarActions::canShareSelectedItems(LLInventoryPanel* inv_panel /* = NUL
|
|||
// static
|
||||
void LLAvatarActions::toggleBlock(const LLUUID& id)
|
||||
{
|
||||
std::string name;
|
||||
LLAvatarName av_name;
|
||||
LLAvatarNameCache::get(id, &av_name);
|
||||
|
||||
gCacheName->getFullName(id, name); // needed for mute
|
||||
LLMute mute(id, name, LLMute::AGENT);
|
||||
LLMute mute(id, av_name.getUserName(), LLMute::AGENT);
|
||||
|
||||
if (LLMuteList::getInstance()->isMuted(mute.mID, mute.mName))
|
||||
{
|
||||
|
|
@ -1247,13 +1246,13 @@ void LLAvatarActions::toggleBlock(const LLUUID& id)
|
|||
// static
|
||||
void LLAvatarActions::toggleMuteVoice(const LLUUID& id)
|
||||
{
|
||||
std::string name;
|
||||
gCacheName->getFullName(id, name); // needed for mute
|
||||
LLAvatarName av_name;
|
||||
LLAvatarNameCache::get(id, &av_name);
|
||||
|
||||
LLMuteList* mute_list = LLMuteList::getInstance();
|
||||
bool is_muted = mute_list->isMuted(id, LLMute::flagVoiceChat);
|
||||
|
||||
LLMute mute(id, name, LLMute::AGENT);
|
||||
LLMute mute(id, av_name.getUserName(), LLMute::AGENT);
|
||||
if (!is_muted)
|
||||
{
|
||||
mute_list->add(mute, LLMute::flagVoiceChat);
|
||||
|
|
@ -1673,9 +1672,9 @@ bool LLAvatarActions::isFriend(const LLUUID& id)
|
|||
// static
|
||||
bool LLAvatarActions::isBlocked(const LLUUID& id)
|
||||
{
|
||||
std::string name;
|
||||
gCacheName->getFullName(id, name); // needed for mute
|
||||
return LLMuteList::getInstance()->isMuted(id, name);
|
||||
LLAvatarName av_name;
|
||||
LLAvatarNameCache::get(id, &av_name);
|
||||
return LLMuteList::getInstance()->isMuted(id, av_name.getUserName());
|
||||
}
|
||||
|
||||
// static
|
||||
|
|
@ -1687,8 +1686,10 @@ bool LLAvatarActions::isVoiceMuted(const LLUUID& id)
|
|||
// static
|
||||
bool LLAvatarActions::canBlock(const LLUUID& id)
|
||||
{
|
||||
std::string full_name;
|
||||
gCacheName->getFullName(id, full_name); // needed for mute
|
||||
LLAvatarName av_name;
|
||||
LLAvatarNameCache::get(id, &av_name);
|
||||
|
||||
std::string full_name = av_name.getUserName();
|
||||
bool is_linden = (full_name.find("Linden") != std::string::npos);
|
||||
bool is_self = id == gAgentID;
|
||||
return !is_self && !is_linden;
|
||||
|
|
|
|||
|
|
@ -55,7 +55,9 @@ LLBlockList::LLBlockList(const Params& p)
|
|||
|
||||
registrar.add ("Block.Action", boost::bind(&LLBlockList::onCustomAction, this, _2));
|
||||
enable_registrar.add("Block.Enable", boost::bind(&LLBlockList::isActionEnabled, this, _2));
|
||||
|
||||
enable_registrar.add("Block.Check", boost::bind(&LLBlockList::isMenuItemChecked, this, _2));
|
||||
enable_registrar.add("Block.Visible", boost::bind(&LLBlockList::isMenuItemVisible, this, _2));
|
||||
|
||||
LLToggleableMenu* context_menu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>(
|
||||
"menu_people_blocked_gear.xml",
|
||||
gMenuHolder,
|
||||
|
|
@ -128,7 +130,14 @@ BOOL LLBlockList::handleRightMouseDown(S32 x, S32 y, MASK mask)
|
|||
|
||||
void LLBlockList::removeListItem(const LLMute* mute)
|
||||
{
|
||||
removeItemByUUID(mute->mID);
|
||||
if (mute->mID.notNull())
|
||||
{
|
||||
removeItemByUUID(mute->mID);
|
||||
}
|
||||
else
|
||||
{
|
||||
removeItemByValue(mute->mName);
|
||||
}
|
||||
}
|
||||
|
||||
void LLBlockList::hideListItem(LLBlockedListItem* item, bool show)
|
||||
|
|
@ -176,7 +185,14 @@ void LLBlockList::addNewItem(const LLMute* mute)
|
|||
{
|
||||
item->highlightName(mNameFilter);
|
||||
}
|
||||
addItem(item, item->getUUID(), ADD_BOTTOM);
|
||||
if (item->getUUID().notNull())
|
||||
{
|
||||
addItem(item, item->getUUID(), ADD_BOTTOM);
|
||||
}
|
||||
else
|
||||
{
|
||||
addItem(item, item->getName(), ADD_BOTTOM);
|
||||
}
|
||||
}
|
||||
|
||||
void LLBlockList::refresh()
|
||||
|
|
@ -184,7 +200,8 @@ void LLBlockList::refresh()
|
|||
bool have_filter = !mNameFilter.empty();
|
||||
|
||||
// save selection to restore it after list rebuilt
|
||||
LLUUID selected = getSelectedUUID(), next_selected;
|
||||
LLSD selected = getSelectedValue();
|
||||
LLSD next_selected;
|
||||
|
||||
if(mShouldAddAll) // creating list of blockers
|
||||
{
|
||||
|
|
@ -202,14 +219,15 @@ void LLBlockList::refresh()
|
|||
}
|
||||
else if(mActionType == REMOVE)
|
||||
{
|
||||
if(selected == mute.mID)
|
||||
if ((mute.mID.notNull() && selected.isUUID() && selected.asUUID() == mute.mID)
|
||||
|| (mute.mID.isNull() && selected.isString() && selected.asString() == mute.mName))
|
||||
{
|
||||
// we are going to remove currently selected item, so select next item and save the selection to restore it
|
||||
if (!selectNextItemPair(false, true))
|
||||
{
|
||||
selectNextItemPair(true, true);
|
||||
}
|
||||
next_selected = getSelectedUUID();
|
||||
if (!selectNextItemPair(false, true))
|
||||
{
|
||||
selectNextItemPair(true, true);
|
||||
}
|
||||
next_selected = getSelectedValue();
|
||||
}
|
||||
removeListItem(&mute);
|
||||
}
|
||||
|
|
@ -235,15 +253,18 @@ void LLBlockList::refresh()
|
|||
}
|
||||
mPrevNameFilter = mNameFilter;
|
||||
|
||||
if (getItemPair(selected))
|
||||
if (selected.isDefined())
|
||||
{
|
||||
// restore previously selected item
|
||||
selectItemPair(getItemPair(selected), true);
|
||||
}
|
||||
else if (getItemPair(next_selected))
|
||||
{
|
||||
// previously selected item was removed, so select next item
|
||||
selectItemPair(getItemPair(next_selected), true);
|
||||
if (getItemPair(selected))
|
||||
{
|
||||
// restore previously selected item
|
||||
selectItemPair(getItemPair(selected), true);
|
||||
}
|
||||
else if (next_selected.isDefined() && getItemPair(next_selected))
|
||||
{
|
||||
// previously selected item was removed, so select next item
|
||||
selectItemPair(getItemPair(next_selected), true);
|
||||
}
|
||||
}
|
||||
mMuteListSize = LLMuteList::getInstance()->getMutes().size();
|
||||
|
||||
|
|
@ -272,7 +293,11 @@ bool LLBlockList::isActionEnabled(const LLSD& userdata)
|
|||
|
||||
const std::string command_name = userdata.asString();
|
||||
|
||||
if ("profile_item" == command_name)
|
||||
if ("profile_item" == command_name
|
||||
|| "block_voice" == command_name
|
||||
|| "block_text" == command_name
|
||||
|| "block_particles" == command_name
|
||||
|| "block_obj_sounds" == command_name)
|
||||
{
|
||||
// <FS:Ansariel> Blocklist multi selection
|
||||
//LLBlockedListItem* item = getBlockedItem();
|
||||
|
|
@ -346,6 +371,83 @@ void LLBlockList::onCustomAction(const LLSD& userdata)
|
|||
break;
|
||||
}
|
||||
}
|
||||
else if ("block_voice" == command_name)
|
||||
{
|
||||
toggleMute(LLMute::flagVoiceChat);
|
||||
}
|
||||
else if ("block_text" == command_name)
|
||||
{
|
||||
toggleMute(LLMute::flagTextChat);
|
||||
}
|
||||
else if ("block_particles" == command_name)
|
||||
{
|
||||
toggleMute(LLMute::flagParticles);
|
||||
}
|
||||
else if ("block_obj_sounds" == command_name)
|
||||
{
|
||||
toggleMute(LLMute::flagObjectSounds);
|
||||
}
|
||||
}
|
||||
|
||||
bool LLBlockList::isMenuItemChecked(const LLSD& userdata)
|
||||
{
|
||||
LLBlockedListItem* item = getBlockedItem();
|
||||
if (!item)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
const std::string command_name = userdata.asString();
|
||||
|
||||
if ("block_voice" == command_name)
|
||||
{
|
||||
return LLMuteList::getInstance()->isMuted(item->getUUID(), LLMute::flagVoiceChat);
|
||||
}
|
||||
else if ("block_text" == command_name)
|
||||
{
|
||||
return LLMuteList::getInstance()->isMuted(item->getUUID(), LLMute::flagTextChat);
|
||||
}
|
||||
else if ("block_particles" == command_name)
|
||||
{
|
||||
return LLMuteList::getInstance()->isMuted(item->getUUID(), LLMute::flagParticles);
|
||||
}
|
||||
else if ("block_obj_sounds" == command_name)
|
||||
{
|
||||
return LLMuteList::getInstance()->isMuted(item->getUUID(), LLMute::flagObjectSounds);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool LLBlockList::isMenuItemVisible(const LLSD& userdata)
|
||||
{
|
||||
LLBlockedListItem* item = getBlockedItem();
|
||||
const std::string command_name = userdata.asString();
|
||||
|
||||
if ("block_voice" == command_name
|
||||
|| "block_text" == command_name
|
||||
|| "block_particles" == command_name
|
||||
|| "block_obj_sounds" == command_name)
|
||||
{
|
||||
return item && (LLMute::AGENT == item->getType());
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void LLBlockList::toggleMute(U32 flags)
|
||||
{
|
||||
LLBlockedListItem* item = getBlockedItem();
|
||||
LLMute mute(item->getUUID(), item->getName(), item->getType());
|
||||
|
||||
if (!LLMuteList::getInstance()->isMuted(item->getUUID(), flags))
|
||||
{
|
||||
LLMuteList::getInstance()->add(mute, flags);
|
||||
}
|
||||
else
|
||||
{
|
||||
LLMuteList::getInstance()->remove(mute, flags);
|
||||
}
|
||||
}
|
||||
|
||||
bool LLBlockListItemComparator::compare(const LLPanel* item1, const LLPanel* item2) const
|
||||
|
|
|
|||
|
|
@ -79,6 +79,9 @@ private:
|
|||
|
||||
bool isActionEnabled(const LLSD& userdata);
|
||||
void onCustomAction (const LLSD& userdata);
|
||||
bool isMenuItemChecked(const LLSD& userdata);
|
||||
bool isMenuItemVisible(const LLSD& userdata);
|
||||
void toggleMute(U32 flags);
|
||||
void createList();
|
||||
|
||||
BlockListActionType getCurrentMuteListActionType();
|
||||
|
|
|
|||
|
|
@ -76,17 +76,37 @@ void LLBox::renderface(S32 which_face)
|
|||
{7, 4, 0, 3}
|
||||
};
|
||||
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//gGL.begin(LLRender::QUADS);
|
||||
// //gGL.normal3fv(&normals[which_face][0]);
|
||||
// gGL.texCoord2f(1,0);
|
||||
// gGL.vertex3fv(&mVertex[ faces[which_face][0] ][0]);
|
||||
// gGL.texCoord2f(1,1);
|
||||
// gGL.vertex3fv(&mVertex[ faces[which_face][1] ][0]);
|
||||
// gGL.texCoord2f(0,1);
|
||||
// gGL.vertex3fv(&mVertex[ faces[which_face][2] ][0]);
|
||||
// gGL.texCoord2f(0,0);
|
||||
// gGL.vertex3fv(&mVertex[ faces[which_face][3] ][0]);
|
||||
//gGL.end();
|
||||
gGL.begin(LLRender::TRIANGLES);
|
||||
{
|
||||
//gGL.normal3fv(&normals[which_face][0]);
|
||||
gGL.texCoord2f(1,0);
|
||||
gGL.texCoord2f(1.f, 0.f);
|
||||
gGL.vertex3fv(&mVertex[ faces[which_face][0] ][0]);
|
||||
gGL.texCoord2f(1,1);
|
||||
gGL.texCoord2f(1.f, 1.f);
|
||||
gGL.vertex3fv(&mVertex[ faces[which_face][1] ][0]);
|
||||
gGL.texCoord2f(0,1);
|
||||
gGL.texCoord2f(0.f, 1.f);
|
||||
gGL.vertex3fv(&mVertex[ faces[which_face][2] ][0]);
|
||||
gGL.texCoord2f(0,0);
|
||||
|
||||
gGL.texCoord2f(1.f, 0.f);
|
||||
gGL.vertex3fv(&mVertex[ faces[which_face][0] ][0]);
|
||||
gGL.texCoord2f(0.f, 1.f);
|
||||
gGL.vertex3fv(&mVertex[ faces[which_face][2] ][0]);
|
||||
gGL.texCoord2f(0.f, 0.f);
|
||||
gGL.vertex3fv(&mVertex[ faces[which_face][3] ][0]);
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
|
||||
void LLBox::render()
|
||||
|
|
|
|||
|
|
@ -251,7 +251,6 @@ S32 LLAvatarTracker::addBuddyList(const LLAvatarTracker::buddy_map_t& buds)
|
|||
using namespace std;
|
||||
|
||||
U32 new_buddy_count = 0;
|
||||
std::string full_name;
|
||||
LLUUID agent_id;
|
||||
for(buddy_map_t::const_iterator itr = buds.begin(); itr != buds.end(); ++itr)
|
||||
{
|
||||
|
|
@ -261,8 +260,11 @@ S32 LLAvatarTracker::addBuddyList(const LLAvatarTracker::buddy_map_t& buds)
|
|||
{
|
||||
++new_buddy_count;
|
||||
mBuddyInfo[agent_id] = (*itr).second;
|
||||
// IDEVO: is this necessary? name is unused?
|
||||
gCacheName->getFullName(agent_id, full_name);
|
||||
|
||||
// pre-request name for notifications?
|
||||
LLAvatarName av_name;
|
||||
LLAvatarNameCache::get(agent_id, &av_name);
|
||||
|
||||
addChangedMask(LLFriendObserver::ADD, agent_id);
|
||||
LL_DEBUGS() << "Added buddy " << agent_id
|
||||
<< ", " << (mBuddyInfo[agent_id]->isOnline() ? "Online" : "Offline")
|
||||
|
|
@ -1045,7 +1047,9 @@ bool LLCollectMappableBuddies::operator()(const LLUUID& buddy_id, LLRelationship
|
|||
|
||||
bool LLCollectOnlineBuddies::operator()(const LLUUID& buddy_id, LLRelationship* buddy)
|
||||
{
|
||||
gCacheName->getFullName(buddy_id, mFullName);
|
||||
LLAvatarName av_name;
|
||||
LLAvatarNameCache::get(buddy_id, &av_name);
|
||||
mFullName = av_name.getUserName();
|
||||
buddy_map_t::value_type value(buddy_id, mFullName);
|
||||
if(buddy->isOnline())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -284,9 +284,9 @@ public:
|
|||
void mute(const LLUUID& participant_id, U32 flags)
|
||||
{
|
||||
BOOL is_muted = LLMuteList::getInstance()->isMuted(participant_id, flags);
|
||||
std::string name;
|
||||
gCacheName->getFullName(participant_id, name);
|
||||
LLMute mute(participant_id, name, LLMute::AGENT);
|
||||
LLAvatarName av_name;
|
||||
LLAvatarNameCache::get(participant_id, &av_name);
|
||||
LLMute mute(participant_id, av_name.getUserName(), LLMute::AGENT);
|
||||
|
||||
if (!is_muted)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -604,12 +604,12 @@ bool LLConversationItemParticipant::isVoiceMuted()
|
|||
|
||||
void LLConversationItemParticipant::muteVoice(bool mute_voice)
|
||||
{
|
||||
std::string name;
|
||||
gCacheName->getFullName(mUUID, name);
|
||||
LLAvatarName av_name;
|
||||
LLAvatarNameCache::get(mUUID, &av_name);
|
||||
LLMuteList * mute_listp = LLMuteList::getInstance();
|
||||
bool voice_already_muted = mute_listp->isMuted(mUUID, name);
|
||||
bool voice_already_muted = mute_listp->isMuted(mUUID, av_name.getUserName());
|
||||
|
||||
LLMute mute(mUUID, name, LLMute::AGENT);
|
||||
LLMute mute(mUUID, av_name.getUserName(), LLMute::AGENT);
|
||||
if (voice_already_muted && !mute_voice)
|
||||
{
|
||||
mute_listp->remove(mute);
|
||||
|
|
|
|||
|
|
@ -617,29 +617,38 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, S32 pass)
|
|||
(!params.mParticle || params.mHasGlow))
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
// <FS:Ansariel> LL materials support merge error
|
||||
LL_RECORD_BLOCK_TIME(FTM_RENDER_ALPHA_GLOW);
|
||||
|
||||
// install glow-accumulating blend mode
|
||||
gGL.blendFunc(LLRender::BF_ZERO, LLRender::BF_ONE, // don't touch color
|
||||
LLRender::BF_ONE, LLRender::BF_ONE); // add to alpha (glow)
|
||||
|
||||
// <FS:Ansariel> LL materials support merge error
|
||||
//emissive_shader->bind();
|
||||
//
|
||||
//params.mVertexBuffer->setBuffer((mask & ~LLVertexBuffer::MAP_COLOR) | LLVertexBuffer::MAP_EMISSIVE);
|
||||
params.mVertexBuffer->setBuffer(mask | LLVertexBuffer::MAP_EMISSIVE);
|
||||
// <FS:Ansariel> Performance fix when not using OpenGL core profile
|
||||
if (LLRender::sGLCoreProfile)
|
||||
{
|
||||
// </FS:Ansariel>
|
||||
emissive_shader->bind();
|
||||
|
||||
params.mVertexBuffer->setBuffer((mask & ~LLVertexBuffer::MAP_COLOR) | LLVertexBuffer::MAP_EMISSIVE);
|
||||
|
||||
// do the actual drawing, again
|
||||
params.mVertexBuffer->drawRange(params.mDrawMode, params.mStart, params.mEnd, params.mCount, params.mOffset);
|
||||
gPipeline.addTrianglesDrawn(params.mCount, params.mDrawMode);
|
||||
|
||||
// restore our alpha blend mode
|
||||
// <FS:Ansariel> LL materials support merge error
|
||||
//gGL.blendFunc(mColorSFactor, mColorDFactor, mAlphaSFactor, mAlphaDFactor);
|
||||
gGL.blendFunc(mColorSFactor, mColorDFactor, mAlphaSFactor, mAlphaDFactor);
|
||||
|
||||
//current_shader->bind();
|
||||
current_shader->bind();
|
||||
// <FS:Ansariel> Performance fix when not using OpenGL core profile
|
||||
}
|
||||
else
|
||||
{
|
||||
params.mVertexBuffer->setBuffer(mask | LLVertexBuffer::MAP_EMISSIVE);
|
||||
|
||||
// do the actual drawing, again
|
||||
params.mVertexBuffer->drawRange(params.mDrawMode, params.mStart, params.mEnd, params.mCount, params.mOffset);
|
||||
gPipeline.addTrianglesDrawn(params.mCount, params.mDrawMode);
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2373,10 +2373,11 @@ void LLDrawPoolAvatar::removeRiggedFace(LLFace* facep)
|
|||
else
|
||||
{
|
||||
// <FS:Ansariel> Additional debugging code
|
||||
//LL_ERRS() << "Face reference data corrupt for rigged type " << i << LL_ENDL;
|
||||
std::string cause = (index >= mRiggedFace[i].size() ? "Index out of bounds" : "Index incorrect");
|
||||
LL_WARNS() << "Face reference data corrupt for rigged type " << i << ": " << cause << LL_ENDL;
|
||||
//LL_ERRS() << "Face reference data corrupt for rigged type " << i
|
||||
LL_WARNS() << "Face reference data corrupt for rigged type " << i
|
||||
// </FS:Ansariel>
|
||||
<< ((mRiggedFace[i].size() <= index) ? "; wrong index (out of bounds)" : (mRiggedFace[i][index] != facep) ? "; wrong face pointer" : "")
|
||||
<< LL_ENDL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ public:
|
|||
mExpanderLabel(more_text)
|
||||
{}
|
||||
|
||||
/*virtual*/ bool getDimensions(S32 first_char, S32 num_chars, S32& width, S32& height) const
|
||||
/*virtual*/ bool getDimensionsF32(S32 first_char, S32 num_chars, F32& width, S32& height) const
|
||||
{
|
||||
// more label always spans width of text box
|
||||
if (num_chars == 0)
|
||||
|
|
|
|||
|
|
@ -503,7 +503,10 @@ U16 LLFace::getGeometryAvatar(
|
|||
LLStrider<LLVector3> &normals,
|
||||
LLStrider<LLVector2> &tex_coords,
|
||||
LLStrider<F32> &vertex_weights,
|
||||
LLStrider<LLVector4> &clothing_weights)
|
||||
// <FS:Ansariel> Vectorized Weight4Strider and ClothWeightStrider by Drake Arconis
|
||||
//LLStrider<LLVector4> &clothing_weights)
|
||||
LLStrider<LLVector4a> &clothing_weights)
|
||||
// </FS:Ansariel>
|
||||
{
|
||||
if (mVertexBuffer.notNull())
|
||||
{
|
||||
|
|
@ -594,16 +597,27 @@ void LLFace::renderSelected(LLViewerTexture *imagep, const LLColor4& color)
|
|||
glPolygonOffset(-1.f, -1.f);
|
||||
gGL.multMatrix((F32*) volume->getRelativeXform().mMatrix);
|
||||
const LLVolumeFace& vol_face = rigged->getVolumeFace(getTEOffset());
|
||||
LLVertexBuffer::unbind();
|
||||
glVertexPointer(3, GL_FLOAT, 16, vol_face.mPositions);
|
||||
if (vol_face.mTexCoords)
|
||||
// <FS:Ansariel> Use a vbo for the static LLVertexBuffer::drawArray/Element functions; by Drake Arconis/Shyotl Kuhr
|
||||
if (LLGLSLShader::sNoFixedFunction)
|
||||
{
|
||||
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||
glTexCoordPointer(2, GL_FLOAT, 8, vol_face.mTexCoords);
|
||||
LLVertexBuffer::drawElements(LLRender::TRIANGLES, vol_face.mNumVertices, vol_face.mPositions, vol_face.mTexCoords, vol_face.mNumIndices, vol_face.mIndices);
|
||||
}
|
||||
gGL.syncMatrices();
|
||||
glDrawElements(GL_TRIANGLES, vol_face.mNumIndices, GL_UNSIGNED_SHORT, vol_face.mIndices);
|
||||
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||
else
|
||||
{
|
||||
// </FS:Ansariel>
|
||||
LLVertexBuffer::unbind();
|
||||
glVertexPointer(3, GL_FLOAT, 16, vol_face.mPositions);
|
||||
if (vol_face.mTexCoords)
|
||||
{
|
||||
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||
glTexCoordPointer(2, GL_FLOAT, 8, vol_face.mTexCoords);
|
||||
}
|
||||
gGL.syncMatrices();
|
||||
glDrawElements(GL_TRIANGLES, vol_face.mNumIndices, GL_UNSIGNED_SHORT, vol_face.mIndices);
|
||||
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||
// <FS:Ansariel> Use a vbo for the static LLVertexBuffer::drawArray/Element functions; by Drake Arconis/Shyotl Kuhr
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1189,11 +1203,15 @@ void LLFace::cacheFaceInVRAM(const LLVolumeFace& vf)
|
|||
|
||||
if (vf.mWeights)
|
||||
{
|
||||
LLStrider<LLVector4> f_wght;
|
||||
// <FS:Ansariel> Vectorized Weight4Strider and ClothWeightStrider by Drake Arconis
|
||||
//LLStrider<LLVector4> f_wght;
|
||||
LLStrider<LLVector4a> f_wght;
|
||||
buff->getWeight4Strider(f_wght);
|
||||
for (U32 i = 0; i < vf.mNumVertices; ++i)
|
||||
{
|
||||
(*f_wght++).set(vf.mWeights[i].getF32ptr());
|
||||
// <FS:Ansariel> Vectorized Weight4Strider and ClothWeightStrider by Drake Arconis
|
||||
//(*f_wght++).set(vf.mWeights[i].getF32ptr());
|
||||
(*f_wght++) = vf.mWeights[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1316,7 +1334,9 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
|
|||
LLStrider<LLColor4U> colors;
|
||||
LLStrider<LLVector3> tangent;
|
||||
LLStrider<U16> indicesp;
|
||||
LLStrider<LLVector4> wght;
|
||||
// <FS:Ansariel> Vectorized Weight4Strider and ClothWeightStrider by Drake Arconis
|
||||
//LLStrider<LLVector4> wght;
|
||||
LLStrider<LLVector4a> wght;
|
||||
|
||||
BOOL full_rebuild = force_rebuild || mDrawablep->isState(LLDrawable::REBUILD_VOLUME);
|
||||
|
||||
|
|
@ -2185,8 +2205,14 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
|
|||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_FACE_GEOM_WEIGHTS);
|
||||
mVertexBuffer->getWeight4Strider(wght, mGeomIndex, mGeomCount, map_range);
|
||||
F32* weights = (F32*) wght.get();
|
||||
LLVector4a::memcpyNonAliased16(weights, (F32*) vf.mWeights, num_vertices*4*sizeof(F32));
|
||||
// <FS:Ansariel> Vectorized Weight4Strider and ClothWeightStrider by Drake Arconis
|
||||
//F32* weights = (F32*) wght.get();
|
||||
//LLVector4a::memcpyNonAliased16(weights, (F32*) vf.mWeights, num_vertices*4*sizeof(F32));
|
||||
for (S32 i = 0; i < num_vertices; ++i)
|
||||
{
|
||||
*(wght++) = vf.mWeights[i];
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
if (map_range)
|
||||
{
|
||||
mVertexBuffer->flush();
|
||||
|
|
|
|||
|
|
@ -174,7 +174,9 @@ public:
|
|||
LLStrider<LLVector3> &normals,
|
||||
LLStrider<LLVector2> &texCoords,
|
||||
LLStrider<F32> &vertex_weights,
|
||||
LLStrider<LLVector4> &clothing_weights);
|
||||
// <FS:Ansariel> Vectorized Weight4Strider and ClothWeightStrider by Drake Arconis
|
||||
//LLStrider<LLVector4> &clothing_weights);
|
||||
LLStrider<LLVector4a> &clothing_weights);
|
||||
|
||||
// For volumes, etc.
|
||||
U16 getGeometry(LLStrider<LLVector3> &vertices,
|
||||
|
|
|
|||
|
|
@ -409,7 +409,16 @@ F32 gpu_benchmark();
|
|||
bool LLFeatureManager::loadGPUClass()
|
||||
{
|
||||
//get memory bandwidth from benchmark
|
||||
F32 gbps = gpu_benchmark();
|
||||
|
||||
// <FS:ND> Allow to skip gpu_benchmark with -noprobe.
|
||||
// This can make sense for some Intel GPUs which can take 15+ Minutes or crash during gpu_benchmark
|
||||
|
||||
// F32 gbps = gpu_benchmark();
|
||||
F32 gbps = -1.0f;
|
||||
if( !gSavedSettings.getBOOL( "NoHardwareProbe" ) )
|
||||
gbps = gpu_benchmark();
|
||||
|
||||
// </FS:ND>
|
||||
|
||||
if (gbps < 0.f)
|
||||
{ //couldn't bench, use GLVersion
|
||||
|
|
@ -766,10 +775,10 @@ void LLFeatureManager::applyBaseMasks()
|
|||
{
|
||||
maskFeatures("MapBufferRange");
|
||||
}
|
||||
//if (gGLManager.mVRAM > 512)
|
||||
//{
|
||||
// maskFeatures("VRAMGT512");
|
||||
//}
|
||||
if (gGLManager.mVRAM > 512)
|
||||
{
|
||||
maskFeatures("VRAMGT512");
|
||||
}
|
||||
|
||||
#if LL_DARWIN
|
||||
const LLOSInfo& osInfo = LLAppViewer::instance()->getOSInfo();
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@
|
|||
LLFilteredWearableListManager::LLFilteredWearableListManager(LLInventoryItemsList* list, LLInventoryCollectFunctor* collector)
|
||||
: mWearableList(list)
|
||||
, mCollector(collector)
|
||||
, mListStale(true)
|
||||
{
|
||||
llassert(mWearableList);
|
||||
gInventory.addObserver(this);
|
||||
|
|
@ -64,7 +65,16 @@ void LLFilteredWearableListManager::changed(U32 mask)
|
|||
return;
|
||||
}
|
||||
|
||||
populateList();
|
||||
if (mWearableList->isInVisibleChain() || mWearableList->getForceRefresh())
|
||||
{
|
||||
// Todo: current populateList() is time consuming and changed() is time-sensitive,
|
||||
// either move from here or optimize
|
||||
populateList();
|
||||
}
|
||||
else
|
||||
{
|
||||
mListStale = true;
|
||||
}
|
||||
}
|
||||
|
||||
void LLFilteredWearableListManager::setFilterCollector(LLInventoryCollectFunctor* collector)
|
||||
|
|
@ -73,13 +83,31 @@ void LLFilteredWearableListManager::setFilterCollector(LLInventoryCollectFunctor
|
|||
populateList();
|
||||
}
|
||||
|
||||
void LLFilteredWearableListManager::populateIfNeeded()
|
||||
{
|
||||
if (mListStale)
|
||||
{
|
||||
populateList();
|
||||
}
|
||||
}
|
||||
|
||||
LLTrace::BlockTimerStatHandle FTM_MANAGER_LIST_POPULATION("Manager List Population");
|
||||
|
||||
void LLFilteredWearableListManager::populateList()
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_MANAGER_LIST_POPULATION);
|
||||
|
||||
LLInventoryModel::cat_array_t cat_array;
|
||||
LLInventoryModel::item_array_t item_array;
|
||||
|
||||
if(mCollector)
|
||||
{
|
||||
// Too slow with large inventory!
|
||||
// Consider refactoring into "request once, append ids on changed()", since
|
||||
// Inventory observer provides ids of changed items this should be possible,
|
||||
// but will likely require modifying LLInventoryItemsList to avoid code-repeats.
|
||||
// Or make something like "gather everything and filter manually on idle"
|
||||
mListStale = false;
|
||||
gInventory.collectDescendentsIf(
|
||||
gInventory.getRootFolderID(),
|
||||
cat_array,
|
||||
|
|
|
|||
|
|
@ -52,9 +52,9 @@ public:
|
|||
void setFilterCollector(LLInventoryCollectFunctor* collector);
|
||||
|
||||
/**
|
||||
* Populates wearable list with filtered data.
|
||||
*/
|
||||
void populateList();
|
||||
* Populates wearable list with filtered data in case there were any updates.
|
||||
*/
|
||||
void populateIfNeeded();
|
||||
|
||||
/**
|
||||
* Drop operation
|
||||
|
|
@ -62,8 +62,14 @@ public:
|
|||
void holdProgress();
|
||||
|
||||
private:
|
||||
/**
|
||||
* Populates wearable list with filtered data.
|
||||
*/
|
||||
void populateList();
|
||||
|
||||
LLInventoryItemsList* mWearableList;
|
||||
LLInventoryCollectFunctor* mCollector;
|
||||
bool mListStale;
|
||||
};
|
||||
|
||||
#endif //LL_LLFILTEREDWEARABLELIST_H
|
||||
|
|
|
|||
|
|
@ -531,37 +531,63 @@ void LLFloaterAvatarPicker::drawFrustum()
|
|||
{
|
||||
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
LLGLEnable(GL_CULL_FACE);
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//gGL.begin(LLRender::QUADS);
|
||||
//{
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(origin_rect.mLeft, origin_rect.mTop);
|
||||
// gGL.vertex2i(origin_rect.mRight, origin_rect.mTop);
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(local_rect.mRight, local_rect.mTop);
|
||||
// gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
// gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(origin_rect.mLeft, origin_rect.mBottom);
|
||||
// gGL.vertex2i(origin_rect.mLeft, origin_rect.mTop);
|
||||
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
// gGL.vertex2i(local_rect.mRight, local_rect.mTop);
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(origin_rect.mRight, origin_rect.mTop);
|
||||
// gGL.vertex2i(origin_rect.mRight, origin_rect.mBottom);
|
||||
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
// gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(origin_rect.mRight, origin_rect.mBottom);
|
||||
// gGL.vertex2i(origin_rect.mLeft, origin_rect.mBottom);
|
||||
//}
|
||||
//gGL.end();
|
||||
gGL.begin(LLRender::TRIANGLE_STRIP);
|
||||
{
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(origin_rect.mLeft, origin_rect.mTop);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(origin_rect.mRight, origin_rect.mTop);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mTop);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(origin_rect.mRight, origin_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(origin_rect.mLeft, origin_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(origin_rect.mLeft, origin_rect.mTop);
|
||||
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mTop);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(origin_rect.mRight, origin_rect.mTop);
|
||||
gGL.vertex2i(origin_rect.mRight, origin_rect.mBottom);
|
||||
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(origin_rect.mRight, origin_rect.mBottom);
|
||||
gGL.vertex2i(origin_rect.mLeft, origin_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
|
||||
if (gFocusMgr.childHasMouseCapture(getDragHandle()))
|
||||
|
|
|
|||
|
|
@ -0,0 +1,289 @@
|
|||
/**
|
||||
* @file llfloateravatarrendersettings.cpp
|
||||
* @brief Shows the list of avatars with non-default rendering settings
|
||||
*
|
||||
* $LicenseInfo:firstyear=2009&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2017, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#if 0 // <FS:Ansariel> [FS Persisted Avatar Render Settings]
|
||||
|
||||
#include "llfloateravatarrendersettings.h"
|
||||
|
||||
#include "llavatarnamecache.h"
|
||||
#include "llfloateravatarpicker.h"
|
||||
#include "llfiltereditor.h"
|
||||
#include "llfloaterreg.h"
|
||||
#include "llnamelistctrl.h"
|
||||
#include "llmenugl.h"
|
||||
#include "llviewerobjectlist.h"
|
||||
#include "llvoavatar.h"
|
||||
|
||||
class LLSettingsContextMenu : public LLListContextMenu
|
||||
|
||||
{
|
||||
public:
|
||||
LLSettingsContextMenu(LLFloaterAvatarRenderSettings* floater_settings)
|
||||
: mFloaterSettings(floater_settings)
|
||||
{}
|
||||
protected:
|
||||
LLContextMenu* createMenu()
|
||||
{
|
||||
LLUICtrl::CommitCallbackRegistry::ScopedRegistrar registrar;
|
||||
LLUICtrl::EnableCallbackRegistry::ScopedRegistrar enable_registrar;
|
||||
registrar.add("Settings.SetRendering", boost::bind(&LLFloaterAvatarRenderSettings::onCustomAction, mFloaterSettings, _2, mUUIDs.front()));
|
||||
enable_registrar.add("Settings.IsSelected", boost::bind(&LLFloaterAvatarRenderSettings::isActionChecked, mFloaterSettings, _2, mUUIDs.front()));
|
||||
LLContextMenu* menu = createFromFile("menu_avatar_rendering_settings.xml");
|
||||
|
||||
return menu;
|
||||
}
|
||||
|
||||
LLFloaterAvatarRenderSettings* mFloaterSettings;
|
||||
};
|
||||
|
||||
class LLAvatarRenderMuteListObserver : public LLMuteListObserver
|
||||
{
|
||||
/* virtual */ void onChange() { LLFloaterAvatarRenderSettings::setNeedsUpdate();}
|
||||
};
|
||||
|
||||
static LLAvatarRenderMuteListObserver sAvatarRenderMuteListObserver;
|
||||
|
||||
LLFloaterAvatarRenderSettings::LLFloaterAvatarRenderSettings(const LLSD& key)
|
||||
: LLFloater(key),
|
||||
mAvatarSettingsList(NULL),
|
||||
mNeedsUpdate(false)
|
||||
{
|
||||
mContextMenu = new LLSettingsContextMenu(this);
|
||||
LLRenderMuteList::getInstance()->addObserver(&sAvatarRenderMuteListObserver);
|
||||
mCommitCallbackRegistrar.add("Settings.AddNewEntry", boost::bind(&LLFloaterAvatarRenderSettings::onClickAdd, this, _2));
|
||||
}
|
||||
|
||||
LLFloaterAvatarRenderSettings::~LLFloaterAvatarRenderSettings()
|
||||
{
|
||||
delete mContextMenu;
|
||||
LLRenderMuteList::getInstance()->removeObserver(&sAvatarRenderMuteListObserver);
|
||||
}
|
||||
|
||||
BOOL LLFloaterAvatarRenderSettings::postBuild()
|
||||
{
|
||||
LLFloater::postBuild();
|
||||
mAvatarSettingsList = getChild<LLNameListCtrl>("render_settings_list");
|
||||
mAvatarSettingsList->setRightMouseDownCallback(boost::bind(&LLFloaterAvatarRenderSettings::onAvatarListRightClick, this, _1, _2, _3));
|
||||
this->setVisibleCallback(boost::bind(&LLFloaterAvatarRenderSettings::removePicker, this));
|
||||
getChild<LLFilterEditor>("people_filter_input")->setCommitCallback(boost::bind(&LLFloaterAvatarRenderSettings::onFilterEdit, this, _2));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void LLFloaterAvatarRenderSettings::removePicker()
|
||||
{
|
||||
if(mPicker.get())
|
||||
{
|
||||
mPicker.get()->closeFloater();
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterAvatarRenderSettings::draw()
|
||||
{
|
||||
if(mNeedsUpdate)
|
||||
{
|
||||
updateList();
|
||||
mNeedsUpdate = false;
|
||||
}
|
||||
|
||||
LLFloater::draw();
|
||||
}
|
||||
|
||||
void LLFloaterAvatarRenderSettings::onAvatarListRightClick(LLUICtrl* ctrl, S32 x, S32 y)
|
||||
{
|
||||
LLNameListCtrl* list = dynamic_cast<LLNameListCtrl*>(ctrl);
|
||||
if (!list) return;
|
||||
list->selectItemAt(x, y, MASK_NONE);
|
||||
uuid_vec_t selected_uuids;
|
||||
|
||||
if(list->getCurrentID().notNull())
|
||||
{
|
||||
selected_uuids.push_back(list->getCurrentID());
|
||||
mContextMenu->show(ctrl, selected_uuids, x, y);
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterAvatarRenderSettings::onOpen(const LLSD& key)
|
||||
{
|
||||
updateList();
|
||||
}
|
||||
|
||||
void LLFloaterAvatarRenderSettings::updateList()
|
||||
{
|
||||
mAvatarSettingsList->deleteAllItems();
|
||||
LLAvatarName av_name;
|
||||
LLNameListCtrl::NameItem item_params;
|
||||
for (std::map<LLUUID, S32>::iterator iter = LLRenderMuteList::getInstance()->sVisuallyMuteSettingsMap.begin(); iter != LLRenderMuteList::getInstance()->sVisuallyMuteSettingsMap.end(); iter++)
|
||||
{
|
||||
item_params.value = iter->first;
|
||||
LLAvatarNameCache::get(iter->first, &av_name);
|
||||
if(!isHiddenRow(av_name.getCompleteName()))
|
||||
{
|
||||
item_params.columns.add().value(av_name.getCompleteName()).column("name");
|
||||
std::string setting = getString(iter->second == 1 ? "av_never_render" : "av_always_render");
|
||||
item_params.columns.add().value(setting).column("setting");
|
||||
mAvatarSettingsList->addNameItemRow(item_params);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterAvatarRenderSettings::onFilterEdit(const std::string& search_string)
|
||||
{
|
||||
std::string filter_upper = search_string;
|
||||
LLStringUtil::toUpper(filter_upper);
|
||||
if (mNameFilter != filter_upper)
|
||||
{
|
||||
mNameFilter = filter_upper;
|
||||
mNeedsUpdate = true;
|
||||
}
|
||||
}
|
||||
|
||||
bool LLFloaterAvatarRenderSettings::isHiddenRow(const std::string& av_name)
|
||||
{
|
||||
if (mNameFilter.empty()) return false;
|
||||
std::string upper_name = av_name;
|
||||
LLStringUtil::toUpper(upper_name);
|
||||
return std::string::npos == upper_name.find(mNameFilter);
|
||||
}
|
||||
|
||||
static LLVOAvatar* find_avatar(const LLUUID& id)
|
||||
{
|
||||
LLViewerObject *obj = gObjectList.findObject(id);
|
||||
while (obj && obj->isAttachment())
|
||||
{
|
||||
obj = (LLViewerObject *)obj->getParent();
|
||||
}
|
||||
|
||||
if (obj && obj->isAvatar())
|
||||
{
|
||||
return (LLVOAvatar*)obj;
|
||||
}
|
||||
else
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void LLFloaterAvatarRenderSettings::onCustomAction (const LLSD& userdata, const LLUUID& av_id)
|
||||
{
|
||||
const std::string command_name = userdata.asString();
|
||||
|
||||
S32 new_setting = 0;
|
||||
if ("default" == command_name)
|
||||
{
|
||||
new_setting = S32(LLVOAvatar::AV_RENDER_NORMALLY);
|
||||
}
|
||||
else if ("never" == command_name)
|
||||
{
|
||||
new_setting = S32(LLVOAvatar::AV_DO_NOT_RENDER);
|
||||
}
|
||||
else if ("always" == command_name)
|
||||
{
|
||||
new_setting = S32(LLVOAvatar::AV_ALWAYS_RENDER);
|
||||
}
|
||||
|
||||
LLVOAvatar *avatarp = find_avatar(av_id);
|
||||
if (avatarp)
|
||||
{
|
||||
avatarp->setVisualMuteSettings(LLVOAvatar::VisualMuteSettings(new_setting));
|
||||
}
|
||||
else
|
||||
{
|
||||
LLRenderMuteList::getInstance()->saveVisualMuteSetting(av_id, new_setting);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool LLFloaterAvatarRenderSettings::isActionChecked(const LLSD& userdata, const LLUUID& av_id)
|
||||
{
|
||||
const std::string command_name = userdata.asString();
|
||||
|
||||
S32 visual_setting = LLRenderMuteList::getInstance()->getSavedVisualMuteSetting(av_id);
|
||||
if ("default" == command_name)
|
||||
{
|
||||
return (visual_setting == S32(LLVOAvatar::AV_RENDER_NORMALLY));
|
||||
}
|
||||
else if ("never" == command_name)
|
||||
{
|
||||
return (visual_setting == S32(LLVOAvatar::AV_DO_NOT_RENDER));
|
||||
}
|
||||
else if ("always" == command_name)
|
||||
{
|
||||
return (visual_setting == S32(LLVOAvatar::AV_ALWAYS_RENDER));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void LLFloaterAvatarRenderSettings::setNeedsUpdate()
|
||||
{
|
||||
LLFloaterAvatarRenderSettings* instance = LLFloaterReg::getTypedInstance<LLFloaterAvatarRenderSettings>("avatar_render_settings");
|
||||
if(!instance) return;
|
||||
instance->mNeedsUpdate = true;
|
||||
}
|
||||
|
||||
void LLFloaterAvatarRenderSettings::onClickAdd(const LLSD& userdata)
|
||||
{
|
||||
const std::string command_name = userdata.asString();
|
||||
S32 visual_setting = 0;
|
||||
if ("never" == command_name)
|
||||
{
|
||||
visual_setting = S32(LLVOAvatar::AV_DO_NOT_RENDER);
|
||||
}
|
||||
else if ("always" == command_name)
|
||||
{
|
||||
visual_setting = S32(LLVOAvatar::AV_ALWAYS_RENDER);
|
||||
}
|
||||
|
||||
LLView * button = findChild<LLButton>("plus_btn", TRUE);
|
||||
LLFloater* root_floater = gFloaterView->getParentFloater(this);
|
||||
LLFloaterAvatarPicker * picker = LLFloaterAvatarPicker::show(boost::bind(&LLFloaterAvatarRenderSettings::callbackAvatarPicked, this, _1, visual_setting),
|
||||
FALSE, TRUE, FALSE, root_floater->getName(), button);
|
||||
|
||||
if (root_floater)
|
||||
{
|
||||
root_floater->addDependentFloater(picker);
|
||||
}
|
||||
|
||||
mPicker = picker->getHandle();
|
||||
}
|
||||
|
||||
void LLFloaterAvatarRenderSettings::callbackAvatarPicked(const uuid_vec_t& ids, S32 visual_setting)
|
||||
{
|
||||
if (ids.empty()) return;
|
||||
|
||||
LLVOAvatar *avatarp = find_avatar(ids[0]);
|
||||
if (avatarp)
|
||||
{
|
||||
avatarp->setVisualMuteSettings(LLVOAvatar::VisualMuteSettings(visual_setting));
|
||||
}
|
||||
else
|
||||
{
|
||||
LLRenderMuteList::getInstance()->saveVisualMuteSetting(ids[0], visual_setting);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
/**
|
||||
* @file llfloateravatarrendersettings.h
|
||||
* @brief Shows the list of avatars with non-default rendering settings
|
||||
*
|
||||
* $LicenseInfo:firstyear=2009&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2017, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#if 0 // <FS:Ansariel> [FS Persisted Avatar Render Settings]
|
||||
|
||||
#ifndef LL_LLFLOATERAVATARRENDERSETTINGS_H
|
||||
#define LL_LLFLOATERAVATARRENDERSETTINGS_H
|
||||
|
||||
#include "llfloater.h"
|
||||
#include "lllistcontextmenu.h"
|
||||
#include "llmutelist.h"
|
||||
|
||||
class LLNameListCtrl;
|
||||
|
||||
class LLFloaterAvatarRenderSettings : public LLFloater
|
||||
{
|
||||
public:
|
||||
|
||||
LLFloaterAvatarRenderSettings(const LLSD& key);
|
||||
virtual ~LLFloaterAvatarRenderSettings();
|
||||
|
||||
/*virtual*/ BOOL postBuild();
|
||||
/*virtual*/ void onOpen(const LLSD& key);
|
||||
/*virtual*/ void draw();
|
||||
|
||||
void onAvatarListRightClick(LLUICtrl* ctrl, S32 x, S32 y);
|
||||
|
||||
void updateList();
|
||||
void onFilterEdit(const std::string& search_string);
|
||||
void onCustomAction (const LLSD& userdata, const LLUUID& av_id);
|
||||
bool isActionChecked(const LLSD& userdata, const LLUUID& av_id);
|
||||
void onClickAdd(const LLSD& userdata);
|
||||
|
||||
static void setNeedsUpdate();
|
||||
|
||||
private:
|
||||
bool isHiddenRow(const std::string& av_name);
|
||||
void callbackAvatarPicked(const uuid_vec_t& ids, S32 visual_setting);
|
||||
void removePicker();
|
||||
|
||||
bool mNeedsUpdate;
|
||||
LLListContextMenu* mContextMenu;
|
||||
LLNameListCtrl* mAvatarSettingsList;
|
||||
LLHandle<LLFloater> mPicker;
|
||||
|
||||
std::string mNameFilter;
|
||||
};
|
||||
|
||||
|
||||
#endif //LL_LLFLOATERAVATARRENDERSETTINGS_H
|
||||
|
||||
#endif
|
||||
|
|
@ -43,6 +43,7 @@
|
|||
#include "llviewermenu.h"
|
||||
#include "llviewerobjectlist.h"
|
||||
|
||||
#include "llavatarnamecache.h"
|
||||
#include "fsradar.h"
|
||||
#include "fsscrolllistctrl.h"
|
||||
#include "llclipboard.h"
|
||||
|
|
@ -417,8 +418,9 @@ bool FSBumpListMenu::onContextMenuItemEnable(const LLSD& userdata)
|
|||
{
|
||||
if (!gMeanCollisionList.empty() && mUUIDs.size() == 1)
|
||||
{
|
||||
std::string name;
|
||||
gCacheName->getFullName(mUUIDs.front(), name);
|
||||
LLAvatarName av_name;
|
||||
LLAvatarNameCache::get(mUUIDs.front(), &av_name);
|
||||
std::string name = av_name.getUserName();
|
||||
return LLMuteList::getInstance()->isMuted(mUUIDs.front(), name);
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -529,7 +529,20 @@ void LLFloaterBvhPreview::draw()
|
|||
// </FS>
|
||||
gGL.color3f(1.f, 1.f, 1.f);
|
||||
gGL.getTexUnit(0)->bind(mAnimPreview);
|
||||
gGL.begin( LLRender::QUADS );
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//gGL.begin( LLRender::QUADS );
|
||||
//{
|
||||
// gGL.texCoord2f(0.f, 1.f);
|
||||
// gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT);
|
||||
// gGL.texCoord2f(0.f, 0.f);
|
||||
// gGL.vertex2i(PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
|
||||
// gGL.texCoord2f(1.f, 0.f);
|
||||
// gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
|
||||
// gGL.texCoord2f(1.f, 1.f);
|
||||
// gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT);
|
||||
//}
|
||||
//gGL.end();
|
||||
gGL.begin( LLRender::TRIANGLES );
|
||||
{
|
||||
gGL.texCoord2f(0.f, 1.f);
|
||||
gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT);
|
||||
|
|
@ -537,10 +550,16 @@ void LLFloaterBvhPreview::draw()
|
|||
gGL.vertex2i(PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
|
||||
gGL.texCoord2f(1.f, 0.f);
|
||||
gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
|
||||
|
||||
gGL.texCoord2f(0.f, 1.f);
|
||||
gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT);
|
||||
gGL.texCoord2f(1.f, 0.f);
|
||||
gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
|
||||
gGL.texCoord2f(1.f, 1.f);
|
||||
gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT);
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
// <FS> Preview on own avatar
|
||||
//LLVOAvatar* avatarp = mAnimPreview->getDummyAvatar();
|
||||
|
|
|
|||
|
|
@ -506,37 +506,63 @@ void LLFloaterColorPicker::draw()
|
|||
{
|
||||
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
LLGLEnable(GL_CULL_FACE);
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//gGL.begin(LLRender::QUADS);
|
||||
//{
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(swatch_rect.mLeft, swatch_rect.mTop);
|
||||
// gGL.vertex2i(swatch_rect.mRight, swatch_rect.mTop);
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(local_rect.mRight, local_rect.mTop);
|
||||
// gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
// gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(swatch_rect.mLeft, swatch_rect.mBottom);
|
||||
// gGL.vertex2i(swatch_rect.mLeft, swatch_rect.mTop);
|
||||
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
// gGL.vertex2i(local_rect.mRight, local_rect.mTop);
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(swatch_rect.mRight, swatch_rect.mTop);
|
||||
// gGL.vertex2i(swatch_rect.mRight, swatch_rect.mBottom);
|
||||
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
// gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(swatch_rect.mRight, swatch_rect.mBottom);
|
||||
// gGL.vertex2i(swatch_rect.mLeft, swatch_rect.mBottom);
|
||||
//}
|
||||
//gGL.end();
|
||||
gGL.begin(LLRender::TRIANGLE_STRIP);
|
||||
{
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(swatch_rect.mLeft, swatch_rect.mTop);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(swatch_rect.mRight, swatch_rect.mTop);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mTop);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(swatch_rect.mRight, swatch_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(swatch_rect.mLeft, swatch_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(swatch_rect.mLeft, swatch_rect.mTop);
|
||||
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mTop);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(swatch_rect.mRight, swatch_rect.mTop);
|
||||
gGL.vertex2i(swatch_rect.mRight, swatch_rect.mBottom);
|
||||
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(swatch_rect.mRight, swatch_rect.mBottom);
|
||||
gGL.vertex2i(swatch_rect.mLeft, swatch_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
|
||||
if (gFocusMgr.childHasMouseCapture(getDragHandle()))
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include "llavatarnamecache.h"
|
||||
#include "llconversationlog.h"
|
||||
#include "llfloaterconversationpreview.h"
|
||||
#include "llimview.h"
|
||||
|
|
@ -239,7 +240,7 @@ void LLFloaterConversationPreview::showHistory()
|
|||
else
|
||||
{
|
||||
std::string legacy_name = gCacheName->buildLegacyName(from);
|
||||
gCacheName->getUUID(legacy_name, from_id);
|
||||
from_id = LLAvatarNameCache::findIdByName(legacy_name);
|
||||
}
|
||||
|
||||
LLChat chat;
|
||||
|
|
|
|||
|
|
@ -85,37 +85,63 @@ void LLFloaterExperiencePicker::drawFrustum()
|
|||
{
|
||||
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
LLGLEnable(GL_CULL_FACE);
|
||||
gGL.begin(LLRender::QUADS);
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//gGL.begin(LLRender::QUADS);
|
||||
//{
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(origin_rect.mLeft, origin_rect.mTop);
|
||||
// gGL.vertex2i(origin_rect.mRight, origin_rect.mTop);
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(local_rect.mRight, local_rect.mTop);
|
||||
// gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
// gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(origin_rect.mLeft, origin_rect.mBottom);
|
||||
// gGL.vertex2i(origin_rect.mLeft, origin_rect.mTop);
|
||||
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
// gGL.vertex2i(local_rect.mRight, local_rect.mTop);
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(origin_rect.mRight, origin_rect.mTop);
|
||||
// gGL.vertex2i(origin_rect.mRight, origin_rect.mBottom);
|
||||
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
// gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
// gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
// gGL.vertex2i(origin_rect.mRight, origin_rect.mBottom);
|
||||
// gGL.vertex2i(origin_rect.mLeft, origin_rect.mBottom);
|
||||
//}
|
||||
//gGL.end();
|
||||
gGL.begin(LLRender::TRIANGLE_STRIP);
|
||||
{
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(origin_rect.mLeft, origin_rect.mTop);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(origin_rect.mRight, origin_rect.mTop);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mTop);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(origin_rect.mRight, origin_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(origin_rect.mLeft, origin_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(origin_rect.mLeft, origin_rect.mTop);
|
||||
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mTop);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(origin_rect.mRight, origin_rect.mTop);
|
||||
gGL.vertex2i(origin_rect.mRight, origin_rect.mBottom);
|
||||
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
|
||||
gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
|
||||
gGL.vertex2i(origin_rect.mRight, origin_rect.mBottom);
|
||||
gGL.vertex2i(origin_rect.mLeft, origin_rect.mBottom);
|
||||
gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
|
||||
if (gFocusMgr.childHasMouseCapture(getDragHandle()))
|
||||
|
|
|
|||
|
|
@ -0,0 +1,184 @@
|
|||
/**
|
||||
* @file llfloatergridstatus.cpp
|
||||
* @brief Grid status floater - uses an embedded web browser to show Grid status info
|
||||
*
|
||||
* $LicenseInfo:firstyear=2009&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2017, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#include "llviewerprecompiledheaders.h"
|
||||
|
||||
#include "llfloatergridstatus.h"
|
||||
|
||||
#include "llcallbacklist.h"
|
||||
#include "llcorehttputil.h"
|
||||
#include "llfloaterreg.h"
|
||||
#include "llhttpconstants.h"
|
||||
#include "llmediactrl.h"
|
||||
#include "llsdserialize.h"
|
||||
#include "lltoolbarview.h"
|
||||
#include "llviewercontrol.h"
|
||||
#include "llxmltree.h"
|
||||
|
||||
std::map<std::string, std::string> LLFloaterGridStatus::sItemsMap;
|
||||
const std::string DEFAULT_GRID_STATUS_URL = "http://secondlife-status.statuspage.io/";
|
||||
|
||||
LLFloaterGridStatus::LLFloaterGridStatus(const Params& key) :
|
||||
LLFloaterWebContent(key),
|
||||
mIsFirstUpdate(TRUE)
|
||||
{
|
||||
}
|
||||
|
||||
BOOL LLFloaterGridStatus::postBuild()
|
||||
{
|
||||
LLFloaterWebContent::postBuild();
|
||||
mWebBrowser->addObserver(this);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void LLFloaterGridStatus::onOpen(const LLSD& key)
|
||||
{
|
||||
Params p(key);
|
||||
p.trusted_content = true;
|
||||
p.allow_address_entry = false;
|
||||
|
||||
LLFloaterWebContent::onOpen(p);
|
||||
applyPreferredRect();
|
||||
if (mWebBrowser)
|
||||
{
|
||||
mWebBrowser->navigateTo(DEFAULT_GRID_STATUS_URL, HTTP_CONTENT_TEXT_HTML);
|
||||
}
|
||||
}
|
||||
|
||||
void LLFloaterGridStatus::startGridStatusTimer()
|
||||
{
|
||||
checkGridStatusRSS();
|
||||
doPeriodically(boost::bind(&LLFloaterGridStatus::checkGridStatusRSS), gSavedSettings.getF32("GridStatusUpdateDelay"));
|
||||
}
|
||||
|
||||
bool LLFloaterGridStatus::checkGridStatusRSS()
|
||||
{
|
||||
if(gToolBarView->hasCommand(LLCommandId("gridstatus")))
|
||||
{
|
||||
LLCoros::instance().launch("LLFloaterGridStatus::getGridStatusRSSCoro",
|
||||
boost::bind(&LLFloaterGridStatus::getGridStatusRSSCoro));
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void LLFloaterGridStatus::getGridStatusRSSCoro()
|
||||
{
|
||||
|
||||
LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID);
|
||||
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t
|
||||
httpAdapter(new LLCoreHttpUtil::HttpCoroutineAdapter("getGridStatusRSSCoro", httpPolicy));
|
||||
LLCore::HttpRequest::ptr_t httpRequest(new LLCore::HttpRequest);
|
||||
LLCore::HttpOptions::ptr_t httpOpts(new LLCore::HttpOptions);
|
||||
LLCore::HttpHeaders::ptr_t httpHeaders(new LLCore::HttpHeaders);
|
||||
|
||||
httpHeaders->append(HTTP_OUT_HEADER_CONTENT_TYPE, HTTP_CONTENT_TEXT_XML);
|
||||
std::string url = gSavedSettings.getString("GridStatusRSS");
|
||||
|
||||
LLSD result = httpAdapter->getRawAndSuspend(httpRequest, url, httpOpts, httpHeaders);
|
||||
LLSD httpResults = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS];
|
||||
LLCore::HttpStatus status = LLCoreHttpUtil::HttpCoroutineAdapter::getStatusFromLLSD(httpResults);
|
||||
if (!status)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const LLSD::Binary &rawBody = result[LLCoreHttpUtil::HttpCoroutineAdapter::HTTP_RESULTS_RAW].asBinary();
|
||||
std::string body(rawBody.begin(), rawBody.end());
|
||||
|
||||
std::string fullpath = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,"grid_status_rss.xml");
|
||||
if(!gSavedSettings.getBOOL("TestGridStatusRSSFromFile"))
|
||||
{
|
||||
llofstream custom_file_out(fullpath.c_str(), std::ios::trunc);
|
||||
if (custom_file_out.is_open())
|
||||
{
|
||||
custom_file_out << body;
|
||||
custom_file_out.close();
|
||||
}
|
||||
}
|
||||
LLXmlTree grid_status_xml;
|
||||
if (!grid_status_xml.parseFile(fullpath))
|
||||
{
|
||||
return ;
|
||||
}
|
||||
bool new_entries = false;
|
||||
LLXmlTreeNode* rootp = grid_status_xml.getRoot();
|
||||
for (LLXmlTreeNode* item = rootp->getChildByName( "entry" ); item; item = rootp->getNextNamedChild())
|
||||
{
|
||||
LLXmlTreeNode* id_node = item->getChildByName("id");
|
||||
LLXmlTreeNode* updated_node = item->getChildByName("updated");
|
||||
if (!id_node || !updated_node)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
std::string guid = id_node->getContents();
|
||||
std::string date = updated_node->getContents();
|
||||
if(sItemsMap.find( guid ) == sItemsMap.end())
|
||||
{
|
||||
new_entries = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(sItemsMap[guid] != date)
|
||||
{
|
||||
new_entries = true;
|
||||
}
|
||||
}
|
||||
sItemsMap[guid] = date;
|
||||
}
|
||||
if(new_entries && !getInstance()->isFirstUpdate())
|
||||
{
|
||||
gToolBarView->flashCommand(LLCommandId("gridstatus"), true);
|
||||
}
|
||||
getInstance()->setFirstUpdate(FALSE);
|
||||
}
|
||||
|
||||
// virtual
|
||||
void LLFloaterGridStatus::handleReshape(const LLRect& new_rect, bool by_user)
|
||||
{
|
||||
if (by_user && !isMinimized())
|
||||
{
|
||||
gSavedSettings.setRect("GridStatusFloaterRect", new_rect);
|
||||
}
|
||||
|
||||
LLFloaterWebContent::handleReshape(new_rect, by_user);
|
||||
}
|
||||
|
||||
void LLFloaterGridStatus::applyPreferredRect()
|
||||
{
|
||||
const LLRect preferred_rect = gSavedSettings.getRect("GridStatusFloaterRect");
|
||||
|
||||
LLRect new_rect = getRect();
|
||||
new_rect.setLeftTopAndSize(
|
||||
new_rect.mLeft, new_rect.mTop,
|
||||
preferred_rect.getWidth(), preferred_rect.getHeight());
|
||||
setShape(new_rect);
|
||||
}
|
||||
|
||||
LLFloaterGridStatus* LLFloaterGridStatus::getInstance()
|
||||
{
|
||||
return LLFloaterReg::getTypedInstance<LLFloaterGridStatus>("grid_status");
|
||||
}
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
/**
|
||||
* @file llfloatergridstatus.h
|
||||
* @brief Grid status floater - uses an embedded web browser to show Grid status info
|
||||
*
|
||||
* $LicenseInfo:firstyear=2009&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2017, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#ifndef LL_LLFLOATERGRIDSTATUS_H
|
||||
#define LL_LLFLOATERGRIDSTATUS_H
|
||||
|
||||
#include "llfloaterwebcontent.h"
|
||||
#include "llviewermediaobserver.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
class LLMediaCtrl;
|
||||
|
||||
|
||||
class LLFloaterGridStatus :
|
||||
public LLFloaterWebContent
|
||||
{
|
||||
public:
|
||||
typedef LLSDParamAdapter<_Params> Params;
|
||||
|
||||
LLFloaterGridStatus(const Params& key);
|
||||
|
||||
/*virtual*/ void onOpen(const LLSD& key);
|
||||
/*virtual*/ void handleReshape(const LLRect& new_rect, bool by_user = false);
|
||||
|
||||
static bool checkGridStatusRSS();
|
||||
static void getGridStatusRSSCoro();
|
||||
|
||||
void startGridStatusTimer();
|
||||
BOOL isFirstUpdate() { return mIsFirstUpdate; }
|
||||
void setFirstUpdate(BOOL first_update) { mIsFirstUpdate = first_update; }
|
||||
|
||||
static LLFloaterGridStatus* getInstance();
|
||||
|
||||
|
||||
private:
|
||||
/*virtual*/ BOOL postBuild();
|
||||
|
||||
void applyPreferredRect();
|
||||
|
||||
static std::map<std::string, std::string> sItemsMap;
|
||||
|
||||
LLFrameTimer mGridStatusTimer;
|
||||
BOOL mIsFirstUpdate;
|
||||
};
|
||||
|
||||
#endif // LL_LLFLOATERGRIDSTATUS_H
|
||||
|
||||
|
|
@ -283,7 +283,20 @@ void LLFloaterImagePreview::draw()
|
|||
}
|
||||
|
||||
gGL.color3f(1.f, 1.f, 1.f);
|
||||
gGL.begin( LLRender::QUADS );
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//gGL.begin( LLRender::QUADS );
|
||||
//{
|
||||
// gGL.texCoord2f(mPreviewImageRect.mLeft, mPreviewImageRect.mTop);
|
||||
// gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT + PREVIEW_VPAD);
|
||||
// gGL.texCoord2f(mPreviewImageRect.mLeft, mPreviewImageRect.mBottom);
|
||||
// gGL.vertex2i(PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
|
||||
// gGL.texCoord2f(mPreviewImageRect.mRight, mPreviewImageRect.mBottom);
|
||||
// gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
|
||||
// gGL.texCoord2f(mPreviewImageRect.mRight, mPreviewImageRect.mTop);
|
||||
// gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT + PREVIEW_VPAD);
|
||||
//}
|
||||
//gGL.end();
|
||||
gGL.begin( LLRender::TRIANGLES );
|
||||
{
|
||||
gGL.texCoord2f(mPreviewImageRect.mLeft, mPreviewImageRect.mTop);
|
||||
gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT + PREVIEW_VPAD);
|
||||
|
|
@ -291,10 +304,16 @@ void LLFloaterImagePreview::draw()
|
|||
gGL.vertex2i(PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
|
||||
gGL.texCoord2f(mPreviewImageRect.mRight, mPreviewImageRect.mBottom);
|
||||
gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
|
||||
|
||||
gGL.texCoord2f(mPreviewImageRect.mLeft, mPreviewImageRect.mTop);
|
||||
gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT + PREVIEW_VPAD);
|
||||
gGL.texCoord2f(mPreviewImageRect.mRight, mPreviewImageRect.mBottom);
|
||||
gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
|
||||
gGL.texCoord2f(mPreviewImageRect.mRight, mPreviewImageRect.mTop);
|
||||
gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT + PREVIEW_VPAD);
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
|
||||
|
|
@ -315,7 +334,20 @@ void LLFloaterImagePreview::draw()
|
|||
gGL.getTexUnit(0)->bind(mAvatarPreview);
|
||||
}
|
||||
|
||||
gGL.begin( LLRender::QUADS );
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//gGL.begin( LLRender::QUADS );
|
||||
//{
|
||||
// gGL.texCoord2f(0.f, 1.f);
|
||||
// gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT + PREVIEW_VPAD);
|
||||
// gGL.texCoord2f(0.f, 0.f);
|
||||
// gGL.vertex2i(PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
|
||||
// gGL.texCoord2f(1.f, 0.f);
|
||||
// gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
|
||||
// gGL.texCoord2f(1.f, 1.f);
|
||||
// gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT + PREVIEW_VPAD);
|
||||
//}
|
||||
//gGL.end();
|
||||
gGL.begin( LLRender::TRIANGLES );
|
||||
{
|
||||
gGL.texCoord2f(0.f, 1.f);
|
||||
gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT + PREVIEW_VPAD);
|
||||
|
|
@ -323,10 +355,16 @@ void LLFloaterImagePreview::draw()
|
|||
gGL.vertex2i(PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
|
||||
gGL.texCoord2f(1.f, 0.f);
|
||||
gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
|
||||
|
||||
gGL.texCoord2f(1.f, 0.f);
|
||||
gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_HPAD + PREF_BUTTON_HEIGHT + PREVIEW_HPAD);
|
||||
gGL.texCoord2f(0.f, 1.f);
|
||||
gGL.vertex2i(PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT + PREVIEW_VPAD);
|
||||
gGL.texCoord2f(1.f, 1.f);
|
||||
gGL.vertex2i(r.getWidth() - PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT + PREVIEW_VPAD);
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2100,9 +2100,10 @@ void LLFloaterIMContainer::toggleAllowTextChat(const LLUUID& participant_uuid)
|
|||
void LLFloaterIMContainer::toggleMute(const LLUUID& participant_id, U32 flags)
|
||||
{
|
||||
BOOL is_muted = LLMuteList::getInstance()->isMuted(participant_id, flags);
|
||||
std::string name;
|
||||
gCacheName->getFullName(participant_id, name);
|
||||
LLMute mute(participant_id, name, LLMute::AGENT);
|
||||
|
||||
LLAvatarName av_name;
|
||||
LLAvatarNameCache::get(participant_id, &av_name);
|
||||
LLMute mute(participant_id, av_name.getUserName(), LLMute::AGENT);
|
||||
|
||||
if (!is_muted)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -228,7 +228,7 @@ void LLFloaterIMNearbyChat::loadHistory()
|
|||
else
|
||||
{
|
||||
std::string legacy_name = gCacheName->buildLegacyName(from);
|
||||
gCacheName->getUUID(legacy_name, from_id);
|
||||
from_id = LLAvatarNameCache::findIdByName(legacy_name);
|
||||
}
|
||||
|
||||
LLChat chat;
|
||||
|
|
|
|||
|
|
@ -604,6 +604,7 @@ void LLFloaterMarketplaceListings::updateView()
|
|||
text = LLTrans::getString("InventoryMarketplaceError", subs);
|
||||
title = LLTrans::getString("InventoryOutboxErrorTitle");
|
||||
tooltip = LLTrans::getString("InventoryOutboxErrorTooltip");
|
||||
LL_WARNS() << "Marketplace status code: " << mkt_status << LL_ENDL;
|
||||
}
|
||||
|
||||
mInventoryText->setValue(text);
|
||||
|
|
|
|||
|
|
@ -88,7 +88,6 @@
|
|||
// <AW: opensim-limits>
|
||||
#include "llworld.h"
|
||||
// </AW: opensim-limits>
|
||||
#include "nd/ndboolswitch.h" // <FS:ND/> To toggle LLRender::sGLCoreProfile
|
||||
|
||||
#include "glod/glod.h"
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
|
@ -757,7 +756,20 @@ void LLFloaterModelPreview::draw()
|
|||
mPreviewRect = preview_panel->getRect();
|
||||
}
|
||||
|
||||
gGL.begin( LLRender::QUADS );
|
||||
// <FS:Ansariel> Remove QUADS rendering mode
|
||||
//gGL.begin( LLRender::QUADS );
|
||||
//{
|
||||
// gGL.texCoord2f(0.f, 1.f);
|
||||
// gGL.vertex2i(mPreviewRect.mLeft, mPreviewRect.mTop-1);
|
||||
// gGL.texCoord2f(0.f, 0.f);
|
||||
// gGL.vertex2i(mPreviewRect.mLeft, mPreviewRect.mBottom);
|
||||
// gGL.texCoord2f(1.f, 0.f);
|
||||
// gGL.vertex2i(mPreviewRect.mRight-1, mPreviewRect.mBottom);
|
||||
// gGL.texCoord2f(1.f, 1.f);
|
||||
// gGL.vertex2i(mPreviewRect.mRight-1, mPreviewRect.mTop-1);
|
||||
//}
|
||||
//gGL.end();
|
||||
gGL.begin( LLRender::TRIANGLES );
|
||||
{
|
||||
gGL.texCoord2f(0.f, 1.f);
|
||||
gGL.vertex2i(mPreviewRect.mLeft, mPreviewRect.mTop-1);
|
||||
|
|
@ -765,10 +777,16 @@ void LLFloaterModelPreview::draw()
|
|||
gGL.vertex2i(mPreviewRect.mLeft, mPreviewRect.mBottom);
|
||||
gGL.texCoord2f(1.f, 0.f);
|
||||
gGL.vertex2i(mPreviewRect.mRight-1, mPreviewRect.mBottom);
|
||||
gGL.texCoord2f(1.f, 1.f);
|
||||
gGL.vertex2i(mPreviewRect.mRight-1, mPreviewRect.mTop-1);
|
||||
|
||||
gGL.texCoord2f(1.f, 0.f);
|
||||
gGL.vertex2i(mPreviewRect.mRight-1, mPreviewRect.mBottom);
|
||||
gGL.texCoord2f( 1.f, 1.f );
|
||||
gGL.vertex2i( mPreviewRect.mRight - 1, mPreviewRect.mTop - 1 );
|
||||
gGL.texCoord2f( 0.f, 1.f );
|
||||
gGL.vertex2i(mPreviewRect.mLeft, mPreviewRect.mTop-1);
|
||||
}
|
||||
gGL.end();
|
||||
// </FS:Ansariel>
|
||||
|
||||
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
|
||||
}
|
||||
|
|
@ -2507,7 +2525,43 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim
|
|||
U32 num_indices = mVertexBuffer[5][mdl][i]->getNumIndices();
|
||||
if (num_indices > 2)
|
||||
{
|
||||
glodInsertElements(mObject[mdl], i, GL_TRIANGLES, num_indices, GL_UNSIGNED_SHORT, (U8*) mVertexBuffer[5][mdl][i]->getIndicesPointer(), 0, 0.f);
|
||||
// <FS:ND> Fix glod so it works when just using the opengl core profile
|
||||
LLStrider<LLVector3> vertex_strider;
|
||||
LLStrider<LLVector3> normal_strider;
|
||||
LLStrider<LLVector2> tc_strider;
|
||||
|
||||
LLStrider< U16 > index_strider;
|
||||
buff->getIndexStrider( index_strider );
|
||||
|
||||
glodVBO vbo = {};
|
||||
|
||||
if( buff->hasDataType( LLVertexBuffer::TYPE_VERTEX ) )
|
||||
{
|
||||
buff->getVertexStrider( vertex_strider );
|
||||
vbo.mV.p = vertex_strider.get();
|
||||
vbo.mV.size = 3;
|
||||
vbo.mV.stride = LLVertexBuffer::sTypeSize[ LLVertexBuffer::TYPE_VERTEX ];
|
||||
vbo.mV.type = GL_FLOAT;
|
||||
}
|
||||
if( buff->hasDataType( LLVertexBuffer::TYPE_NORMAL ) )
|
||||
{
|
||||
buff->getNormalStrider( normal_strider );
|
||||
vbo.mN.p = normal_strider.get();
|
||||
vbo.mN.stride = LLVertexBuffer::sTypeSize[ LLVertexBuffer::TYPE_NORMAL ];
|
||||
vbo.mN.type = GL_FLOAT;
|
||||
}
|
||||
if( buff->hasDataType( LLVertexBuffer::TYPE_TEXCOORD0 ) )
|
||||
{
|
||||
buff->getTexCoord0Strider( tc_strider );
|
||||
vbo.mT.p = tc_strider.get();
|
||||
vbo.mT.size = 2;
|
||||
vbo.mT.stride = LLVertexBuffer::sTypeSize[ LLVertexBuffer::TYPE_TEXCOORD0 ];
|
||||
vbo.mT.type = GL_FLOAT;
|
||||
}
|
||||
|
||||
glodInsertElements( mObject[ mdl ], i, GL_TRIANGLES, num_indices, GL_UNSIGNED_SHORT, (U8*)index_strider.get(), 0, 0.f, &vbo );
|
||||
// glodInsertElements( mObject[ mdl ], i, GL_TRIANGLES, num_indices, GL_UNSIGNED_SHORT, (U8*)mVertexBuffer[ 5 ][ mdl ][ i ]->getIndicesPointer(), 0, 0.f );
|
||||
// </FS:ND>
|
||||
}
|
||||
tri_count += num_indices/3;
|
||||
stop_gloderror();
|
||||
|
|
@ -2629,28 +2683,65 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim
|
|||
{
|
||||
type_mask = mVertexBuffer[5][base][i]->getTypeMask();
|
||||
|
||||
// <FS:ND> Make sure LLRender::sGLCoreProfile is off, so we get a buffer we can pass into GLOD
|
||||
nd::utils::boolSwitch switchCoreProfile ( &LLRender::sGLCoreProfile, false );
|
||||
// </FS: ND>
|
||||
|
||||
LLPointer<LLVertexBuffer> buff = new LLVertexBuffer(type_mask, 0);
|
||||
|
||||
// <FS:ND> And reset LLRender::sGLCoreProfile again
|
||||
switchCoreProfile.reset();
|
||||
// </FS: ND>
|
||||
|
||||
if (sizes[i*2+1] > 0 && sizes[i*2] > 0)
|
||||
{
|
||||
buff->allocateBuffer(sizes[i*2+1], sizes[i*2], true);
|
||||
buff->setBuffer(type_mask);
|
||||
glodFillElements(mObject[base], names[i], GL_UNSIGNED_SHORT, (U8*) buff->getIndicesPointer());
|
||||
|
||||
// <FS:ND> Fix glod so it works when just using the opengl core profile
|
||||
LLStrider<LLVector3> vertex_strider;
|
||||
LLStrider<LLVector3> normal_strider;
|
||||
LLStrider<LLVector2> tc_strider;
|
||||
|
||||
LLStrider< U16 > index_strider;
|
||||
buff->getIndexStrider( index_strider );
|
||||
|
||||
glodVBO vbo = {};
|
||||
|
||||
if( buff->hasDataType( LLVertexBuffer::TYPE_VERTEX ) )
|
||||
{
|
||||
buff->getVertexStrider( vertex_strider );
|
||||
vbo.mV.p = vertex_strider.get();
|
||||
vbo.mV.size = 3;
|
||||
vbo.mV.stride = LLVertexBuffer::sTypeSize[ LLVertexBuffer::TYPE_VERTEX ];
|
||||
vbo.mV.type = GL_FLOAT;
|
||||
}
|
||||
if( buff->hasDataType( LLVertexBuffer::TYPE_NORMAL ) )
|
||||
{
|
||||
buff->getNormalStrider( normal_strider );
|
||||
vbo.mN.p = normal_strider.get();
|
||||
vbo.mN.stride = LLVertexBuffer::sTypeSize[ LLVertexBuffer::TYPE_NORMAL ];
|
||||
vbo.mN.type = GL_FLOAT;
|
||||
}
|
||||
if( buff->hasDataType( LLVertexBuffer::TYPE_TEXCOORD0 ) )
|
||||
{
|
||||
buff->getTexCoord0Strider( tc_strider );
|
||||
vbo.mT.p = tc_strider.get();
|
||||
vbo.mT.size = 2;
|
||||
vbo.mT.stride = LLVertexBuffer::sTypeSize[ LLVertexBuffer::TYPE_TEXCOORD0 ];
|
||||
vbo.mT.type = GL_FLOAT;
|
||||
}
|
||||
|
||||
glodFillElements( mObject[ base ], names[ i ], GL_UNSIGNED_SHORT, (U8*)index_strider.get(), &vbo );
|
||||
// glodFillElements(mObject[base], names[i], GL_UNSIGNED_SHORT, (U8*) buff->getIndicesPointer());
|
||||
// </FS:ND>
|
||||
|
||||
stop_gloderror();
|
||||
}
|
||||
else
|
||||
{ //this face was eliminated, create a dummy triangle (one vertex, 3 indices, all 0)
|
||||
buff->allocateBuffer(1, 3, true);
|
||||
memset((U8*) buff->getMappedData(), 0, buff->getSize());
|
||||
memset((U8*) buff->getIndicesPointer(), 0, buff->getIndicesSize());
|
||||
|
||||
// <FS:ND> Fix when running with opengl core profile
|
||||
LLStrider< U16 > index_strider;
|
||||
buff->getIndexStrider( index_strider );
|
||||
|
||||
memset( (U8*)index_strider.get(), 0, buff->getIndicesSize() );
|
||||
// memset( (U8*)buff->getIndicesPointer(), 0, buff->getIndicesSize() );
|
||||
// </FS:ND>
|
||||
}
|
||||
|
||||
buff->validateRange(0, buff->getNumVerts()-1, buff->getNumIndices(), 0);
|
||||
|
|
@ -2733,6 +2824,7 @@ void LLModelPreview::genLODs(S32 which_lod, U32 decimation, bool enforce_tri_lim
|
|||
{
|
||||
shader->bind();
|
||||
}
|
||||
refresh(); // <FS:ND/> refresh once to make sure render gets called with the updated vbos
|
||||
}
|
||||
|
||||
void LLModelPreview::updateStatusMessages()
|
||||
|
|
@ -3393,23 +3485,17 @@ void LLModelPreview::genBuffers(S32 lod, bool include_skin_weights)
|
|||
mask |= LLVertexBuffer::MAP_WEIGHT4;
|
||||
}
|
||||
|
||||
// <FS:ND> Make sure LLRender::sGLCoreProfile is off, so we get a buffer we can pass into GLOD
|
||||
nd::utils::boolSwitch switchCoreProfile ( &LLRender::sGLCoreProfile, false );
|
||||
// </FS:ND>
|
||||
|
||||
vb = new LLVertexBuffer(mask, 0);
|
||||
|
||||
// <FS:ND> And reset LLRender::sGLCoreProfile again
|
||||
switchCoreProfile.reset();
|
||||
// </FS:ND>
|
||||
|
||||
vb->allocateBuffer(num_vertices, num_indices, TRUE);
|
||||
|
||||
LLStrider<LLVector3> vertex_strider;
|
||||
LLStrider<LLVector3> normal_strider;
|
||||
LLStrider<LLVector2> tc_strider;
|
||||
LLStrider<U16> index_strider;
|
||||
LLStrider<LLVector4> weights_strider;
|
||||
// <FS:Ansariel> Vectorized Weight4Strider and ClothWeightStrider by Drake Arconis
|
||||
//LLStrider<LLVector4> weights_strider;
|
||||
LLStrider<LLVector4a> weights_strider;
|
||||
|
||||
vb->getVertexStrider(vertex_strider);
|
||||
vb->getIndexStrider(index_strider);
|
||||
|
|
@ -3455,7 +3541,9 @@ void LLModelPreview::genBuffers(S32 lod, bool include_skin_weights)
|
|||
//should not cause floating point precision issues.
|
||||
}
|
||||
|
||||
*(weights_strider++) = w;
|
||||
// <FS:Ansariel> Vectorized Weight4Strider and ClothWeightStrider by Drake Arconis
|
||||
//*(weights_strider++) = w;
|
||||
(*(weights_strider++)).loadua(w.mV);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3605,19 +3693,20 @@ void LLModelPreview::addEmptyFace( LLModel* pTarget )
|
|||
{
|
||||
U32 type_mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_NORMAL | LLVertexBuffer::MAP_TEXCOORD0;
|
||||
|
||||
// <FS:ND> Make sure LLRender::sGLCoreProfile is off, so we get a buffer we can pass into GLOD
|
||||
nd::utils::boolSwitch switchCoreProfile ( &LLRender::sGLCoreProfile, false );
|
||||
// </FS:ND>
|
||||
|
||||
LLPointer<LLVertexBuffer> buff = new LLVertexBuffer(type_mask, 0);
|
||||
|
||||
// <FS:ND> And reset LLRender::sGLCoreProfile again
|
||||
switchCoreProfile.reset();
|
||||
// </FS:ND>
|
||||
|
||||
buff->allocateBuffer(1, 3, true);
|
||||
memset( (U8*) buff->getMappedData(), 0, buff->getSize() );
|
||||
memset( (U8*) buff->getIndicesPointer(), 0, buff->getIndicesSize() );
|
||||
|
||||
// <FS:ND> Fix when running with opengl core profile
|
||||
{
|
||||
LLStrider< U16 > index_strider;
|
||||
buff->getIndexStrider( index_strider );
|
||||
|
||||
memset( (U8*)index_strider.get(), 0, buff->getIndicesSize() );
|
||||
}
|
||||
//memset( (U8*) buff->getIndicesPointer(), 0, buff->getIndicesSize() );
|
||||
// </FS:ND>
|
||||
|
||||
buff->validateRange( 0, buff->getNumVerts()-1, buff->getNumIndices(), 0 );
|
||||
|
||||
|
|
@ -4167,7 +4256,9 @@ BOOL LLModelPreview::render()
|
|||
LLStrider<LLVector3> position;
|
||||
buffer->getVertexStrider(position);
|
||||
|
||||
LLStrider<LLVector4> weight;
|
||||
// <FS:Ansariel> Vectorized Weight4Strider and ClothWeightStrider by Drake Arconis
|
||||
//LLStrider<LLVector4> weight;
|
||||
LLStrider<LLVector4a> weight;
|
||||
buffer->getWeight4Strider(weight);
|
||||
|
||||
//quick 'n dirty software vertex skinning
|
||||
|
|
@ -4185,7 +4276,10 @@ BOOL LLModelPreview::render()
|
|||
for (U32 j = 0; j < buffer->getNumVerts(); ++j)
|
||||
{
|
||||
LLMatrix4a final_mat;
|
||||
F32 *wptr = weight[j].mV;
|
||||
// <FS:Ansariel> Vectorized Weight4Strider and ClothWeightStrider by Drake Arconis
|
||||
//F32 *wptr = weight[j].mV;
|
||||
F32 *wptr = weight[j].getF32ptr();
|
||||
// </FS:Ansariel>
|
||||
LLSkinningUtil::getPerVertexSkinMatrix(wptr, mat, true, final_mat, max_joints);
|
||||
|
||||
//VECTORIZE THIS
|
||||
|
|
|
|||
|
|
@ -509,6 +509,7 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
|
|||
mCommitCallbackRegistrar.add("Pref.ClickEnablePopup", boost::bind(&LLFloaterPreference::onClickEnablePopup, this));
|
||||
mCommitCallbackRegistrar.add("Pref.ClickDisablePopup", boost::bind(&LLFloaterPreference::onClickDisablePopup, this));
|
||||
mCommitCallbackRegistrar.add("Pref.LogPath", boost::bind(&LLFloaterPreference::onClickLogPath, this));
|
||||
mCommitCallbackRegistrar.add("Pref.RenderExceptions", boost::bind(&LLFloaterPreference::onClickRenderExceptions, this));
|
||||
mCommitCallbackRegistrar.add("Pref.HardwareDefaults", boost::bind(&LLFloaterPreference::setHardwareDefaults, this));
|
||||
mCommitCallbackRegistrar.add("Pref.AvatarImpostorsEnable", boost::bind(&LLFloaterPreference::onAvatarImpostorsEnable, this));
|
||||
mCommitCallbackRegistrar.add("Pref.UpdateIndirectMaxComplexity", boost::bind(&LLFloaterPreference::updateMaxComplexity, this));
|
||||
|
|
@ -539,7 +540,7 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
|
|||
gSavedSettings.getControl("NameTagShowUsernames")->getCommitSignal()->connect(boost::bind(&handleNameTagOptionChanged, _2));
|
||||
gSavedSettings.getControl("NameTagShowFriends")->getCommitSignal()->connect(boost::bind(&handleNameTagOptionChanged, _2));
|
||||
gSavedSettings.getControl("UseDisplayNames")->getCommitSignal()->connect(boost::bind(&handleDisplayNamesOptionChanged, _2));
|
||||
|
||||
|
||||
gSavedSettings.getControl("AppearanceCameraMovement")->getCommitSignal()->connect(boost::bind(&handleAppearanceCameraMovementChanged, _2));
|
||||
|
||||
LLAvatarPropertiesProcessor::getInstance()->addObserver( gAgent.getID(), this );
|
||||
|
|
@ -1243,10 +1244,12 @@ void LLFloaterPreference::onOpen(const LLSD& key)
|
|||
//LLButton* load_btn = findChild<LLButton>("PrefLoadButton");
|
||||
//LLButton* save_btn = findChild<LLButton>("PrefSaveButton");
|
||||
//LLButton* delete_btn = findChild<LLButton>("PrefDeleteButton");
|
||||
//LLButton* exceptions_btn = findChild<LLButton>("RenderExceptionsButton");
|
||||
|
||||
//load_btn->setEnabled(started);
|
||||
//save_btn->setEnabled(started);
|
||||
//delete_btn->setEnabled(started);
|
||||
//exceptions_btn->setEnabled(started);
|
||||
// </FS:Ansariel>
|
||||
|
||||
// <FS:ND> Hook up and init for filtering
|
||||
|
|
@ -3334,6 +3337,11 @@ void LLFloaterPreference::onClickSpellChecker()
|
|||
LLFloaterReg::showInstance("prefs_spellchecker");
|
||||
}
|
||||
|
||||
void LLFloaterPreference::onClickRenderExceptions()
|
||||
{
|
||||
LLFloaterReg::showInstance("avatar_render_settings");
|
||||
}
|
||||
|
||||
void LLFloaterPreference::onClickAdvanced()
|
||||
{
|
||||
LLFloaterReg::showInstance("prefs_graphics_advanced");
|
||||
|
|
|
|||
|
|
@ -255,6 +255,7 @@ public:
|
|||
void onClickPermsDefault();
|
||||
void onClickAutoReplace();
|
||||
void onClickSpellChecker();
|
||||
void onClickRenderExceptions();
|
||||
void onClickAdvanced();
|
||||
void applyUIColor(LLUICtrl* ctrl, const LLSD& param);
|
||||
void getUIColor(LLUICtrl* ctrl, const LLSD& param);
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
#include <algorithm>
|
||||
#include <functional>
|
||||
#include "llcachename.h"
|
||||
#include "llavatarnamecache.h"
|
||||
#include "lldbstrings.h"
|
||||
#include "llfloaterreg.h"
|
||||
|
||||
|
|
@ -302,12 +303,13 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
|
|||
|
||||
if (item->getCreatorUUID().notNull())
|
||||
{
|
||||
std::string name;
|
||||
gCacheName->getFullName(item->getCreatorUUID(), name);
|
||||
LLAvatarName av_name;
|
||||
LLAvatarNameCache::get(item->getCreatorUUID(), &av_name);
|
||||
getChildView("BtnCreator")->setEnabled(TRUE);
|
||||
getChildView("LabelCreatorTitle")->setEnabled(TRUE);
|
||||
getChildView("LabelCreatorName")->setEnabled(TRUE);
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.1
|
||||
std::string name = av_name.getUserName();
|
||||
// If the object creator matches the object owner we need to anonymize the creator field as well
|
||||
if ( (!RlvActions::canShowName(RlvActions::SNC_DEFAULT, item->getCreatorUUID())) &&
|
||||
( ((perm.isOwned()) && (!perm.isGroupOwned()) && (perm.getOwner() == item->getCreatorUUID()) ) || (RlvUtil::isNearbyAgent(item->getCreatorUUID())) ) )
|
||||
|
|
@ -315,8 +317,9 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
|
|||
childSetEnabled("BtnCreator", FALSE);
|
||||
name = RlvStrings::getAnonym(name);
|
||||
}
|
||||
// [/RLVa:KB]
|
||||
getChild<LLUICtrl>("LabelCreatorName")->setValue(name);
|
||||
// [/RLVa:KB]
|
||||
// getChild<LLUICtrl>("LabelCreatorName")->setValue(av_name.getUserName());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -341,7 +344,9 @@ void LLFloaterProperties::refreshFromItem(LLInventoryItem* item)
|
|||
}
|
||||
else
|
||||
{
|
||||
gCacheName->getFullName(perm.getOwner(), name);
|
||||
LLAvatarName av_name;
|
||||
LLAvatarNameCache::get(perm.getOwner(), &av_name);
|
||||
name = av_name.getUserName();
|
||||
// [RLVa:KB] - Checked: RLVa-2.0.1
|
||||
if (RlvActions::isRlvEnabled())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -375,6 +375,7 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg)
|
|||
std::string sim_type = LLTrans::getString("land_type_unknown");
|
||||
U64 region_flags;
|
||||
U8 agent_limit;
|
||||
S32 hard_agent_limit;
|
||||
F32 object_bonus_factor;
|
||||
U8 sim_access;
|
||||
F32 water_height;
|
||||
|
|
@ -384,6 +385,7 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg)
|
|||
F32 sun_hour;
|
||||
msg->getString("RegionInfo", "SimName", sim_name);
|
||||
msg->getU8("RegionInfo", "MaxAgents", agent_limit);
|
||||
msg->getS32("RegionInfo2", "HardMaxAgents", hard_agent_limit);
|
||||
msg->getF32("RegionInfo", "ObjectBonusFactor", object_bonus_factor);
|
||||
msg->getU8("RegionInfo", "SimAccess", sim_access);
|
||||
msg->getF32Fast(_PREHASH_RegionInfo, _PREHASH_WaterHeight, water_height);
|
||||
|
|
@ -430,6 +432,8 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg)
|
|||
panel->getChild<LLUICtrl>("object_bonus_spin")->setValue(LLSD(object_bonus_factor) );
|
||||
panel->getChild<LLUICtrl>("access_combo")->setValue(LLSD(sim_access) );
|
||||
|
||||
panel->getChild<LLSpinCtrl>("agent_limit_spin")->setMaxValue(hard_agent_limit);
|
||||
|
||||
LLPanelRegionGeneralInfo* panel_general = LLFloaterRegionInfo::getPanelGeneral();
|
||||
if (panel)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -390,6 +390,14 @@ void LLPanelScriptLimitsRegionMemory::setErrorStatus(S32 status, const std::stri
|
|||
LL_WARNS() << "Can't handle remote parcel request."<< " Http Status: "<< status << ". Reason : "<< reason<<LL_ENDL;
|
||||
}
|
||||
|
||||
// callback from the name cache with an owner name to add to the list
|
||||
void LLPanelScriptLimitsRegionMemory::onAvatarNameCache(
|
||||
const LLUUID& id,
|
||||
const LLAvatarName& av_name)
|
||||
{
|
||||
onNameCache(id, av_name.getUserName());
|
||||
}
|
||||
|
||||
// callback from the name cache with an owner name to add to the list
|
||||
void LLPanelScriptLimitsRegionMemory::onNameCache(
|
||||
const LLUUID& id,
|
||||
|
|
@ -503,7 +511,9 @@ void LLPanelScriptLimitsRegionMemory::setRegionDetails(LLSD content)
|
|||
}
|
||||
else
|
||||
{
|
||||
name_is_cached = gCacheName->getFullName(owner_id, owner_buf); // username
|
||||
LLAvatarName av_name;
|
||||
name_is_cached = LLAvatarNameCache::get(owner_id, &av_name);
|
||||
owner_buf = av_name.getUserName();
|
||||
owner_buf = LLCacheName::buildUsername(owner_buf);
|
||||
}
|
||||
if(!name_is_cached)
|
||||
|
|
@ -511,9 +521,18 @@ void LLPanelScriptLimitsRegionMemory::setRegionDetails(LLSD content)
|
|||
if(std::find(names_requested.begin(), names_requested.end(), owner_id) == names_requested.end())
|
||||
{
|
||||
names_requested.push_back(owner_id);
|
||||
gCacheName->get(owner_id, is_group_owned, // username
|
||||
boost::bind(&LLPanelScriptLimitsRegionMemory::onNameCache,
|
||||
this, _1, _2));
|
||||
if (is_group_owned)
|
||||
{
|
||||
gCacheName->getGroup(owner_id,
|
||||
boost::bind(&LLPanelScriptLimitsRegionMemory::onNameCache,
|
||||
this, _1, _2));
|
||||
}
|
||||
else
|
||||
{
|
||||
LLAvatarNameCache::get(owner_id,
|
||||
boost::bind(&LLPanelScriptLimitsRegionMemory::onAvatarNameCache,
|
||||
this, _1, _2));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@
|
|||
|
||||
class LLPanelScriptLimitsInfo;
|
||||
class LLTabContainer;
|
||||
class LLAvatarName;
|
||||
|
||||
class LLPanelScriptLimitsRegionMemory;
|
||||
|
||||
|
|
@ -116,6 +117,8 @@ public:
|
|||
void checkButtonsEnabled();
|
||||
|
||||
private:
|
||||
void onAvatarNameCache(const LLUUID& id,
|
||||
const LLAvatarName& av_name);
|
||||
void onNameCache(const LLUUID& id,
|
||||
const std::string& name);
|
||||
|
||||
|
|
|
|||
|
|
@ -746,11 +746,7 @@ void LLFloaterSnapshot::Impl::setFinished(bool finished, bool ok, const std::str
|
|||
LLUICtrl* finished_lbl = mFloater->getChild<LLUICtrl>(ok ? "succeeded_lbl" : "failed_lbl");
|
||||
std::string result_text = mFloater->getString(msg + "_" + (ok ? "succeeded_str" : "failed_str"));
|
||||
finished_lbl->setValue(result_text);
|
||||
|
||||
// <FS:Ansariel> Don't return to target selection after taking a snapshot
|
||||
//LLSideTrayPanelContainer* panel_container = mFloater->getChild<LLSideTrayPanelContainer>("panel_container");
|
||||
//panel_container->openPreviousPanel();
|
||||
//panel_container->getCurrentPanel()->onOpen(LLSD());
|
||||
LLPanelSnapshot* panel = getActivePanel(mFloater);
|
||||
if (panel)
|
||||
{
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue