Merge branch 'master' of https://github.com/siana/SingularityViewer
This commit is contained in:
@@ -775,7 +775,8 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
|
||||
{ //dump every 128 lines
|
||||
|
||||
LL_WARNS("ShaderLoading") << "\n" << ostr.str() << llendl;
|
||||
ostr = std::stringstream();
|
||||
ostr.str("");
|
||||
ostr.clear();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -60,6 +60,8 @@ BOOL LLPanelMsgs::postBuild()
|
||||
childSetAction("enable_popup", onClickEnablePopup, this);
|
||||
childSetAction("reset_dialogs_btn", onClickResetDialogs, this);
|
||||
childSetAction("skip_dialogs_btn", onClickSkipDialogs, this);
|
||||
childSetAction("skip_frst_btn", onClickSkipFirstTime, this);
|
||||
|
||||
buildLists();
|
||||
|
||||
childSetValue("accept_new_inventory", gSavedSettings.getBOOL("AutoAcceptNewInventory"));
|
||||
@@ -246,3 +248,11 @@ void LLPanelMsgs::onClickSkipDialogs(void* user_data)
|
||||
{
|
||||
LLNotificationsUtil::add("SkipShowNextTimeDialogs", LLSD(), LLSD(), boost::bind(&callback_skip_dialogs, _1, _2, (LLPanelMsgs*)user_data));
|
||||
}
|
||||
|
||||
// static
|
||||
void LLPanelMsgs::onClickSkipFirstTime(void* user_data)
|
||||
{
|
||||
LLFirstUse::disableFirstUse();
|
||||
LLPanelMsgs* panelp = (LLPanelMsgs*)user_data;
|
||||
if(panelp) panelp->buildLists();
|
||||
}
|
||||
|
||||
@@ -52,6 +52,7 @@ public:
|
||||
static void onClickEnablePopup(void* user_data);
|
||||
static void onClickResetDialogs(void* user_data);
|
||||
static void onClickSkipDialogs(void* user_data);
|
||||
static void onClickSkipFirstTime(void* user_data);
|
||||
|
||||
void buildLists();
|
||||
|
||||
|
||||
@@ -3895,6 +3895,19 @@ struct CompareBatchBreakerModified
|
||||
|
||||
void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::vector<LLFace*>& faces, BOOL distance_sort, BOOL batch_textures)
|
||||
{
|
||||
U32 buffer_usage = group->mBufferUsage;
|
||||
|
||||
#if LL_DARWIN
|
||||
// HACK from Leslie:
|
||||
// Disable VBO usage for alpha on Mac OS X because it kills the framerate
|
||||
// due to implicit calls to glTexSubImage that are beyond our control.
|
||||
// (this works because the only calls here that sort by distance are alpha)
|
||||
if (distance_sort)
|
||||
{
|
||||
buffer_usage = 0x0;
|
||||
}
|
||||
#endif
|
||||
|
||||
//calculate maximum number of vertices to store in a single buffer
|
||||
static const LLCachedControl<S32> render_max_vbo_size("RenderMaxVBOSize", 512);
|
||||
U32 max_vertices = (render_max_vbo_size*1024)/LLVertexBuffer::calcVertexSize(group->mSpatialPartition->mVertexDataMask);
|
||||
@@ -4074,17 +4087,15 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::
|
||||
|
||||
if (!buffer)
|
||||
{ //create new buffer if needed
|
||||
buffer = createVertexBuffer(mask,
|
||||
group->mBufferUsage);
|
||||
buffer = createVertexBuffer(mask, buffer_usage);
|
||||
buffer->allocateBuffer(geom_count, index_count, TRUE);
|
||||
}
|
||||
else
|
||||
{ //resize pre-existing buffer
|
||||
if (LLVertexBuffer::sEnableVBOs && buffer->getUsage() != group->mBufferUsage ||
|
||||
if (LLVertexBuffer::sEnableVBOs && buffer->getUsage() != buffer_usage ||
|
||||
buffer->getTypeMask() != mask)
|
||||
{
|
||||
buffer = createVertexBuffer(mask,
|
||||
group->mBufferUsage);
|
||||
buffer = createVertexBuffer(mask, buffer_usage);
|
||||
buffer->allocateBuffer(geom_count, index_count, TRUE);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user