Merge branch 'V2MultiWear' of git://github.com/Shyotl/SingularityViewer into V2MultiWear
Conflicts: indra/llrender/llvertexbuffer.h Chose Shyotl's.
This commit is contained in:
@@ -1367,7 +1367,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
|
||||
|
||||
static LLCachedControl<bool> use_transform_feedback("RenderUseTransformFeedback", false);
|
||||
|
||||
#ifdef GL_TRANSFORM_FEEDBACK_BUFFER
|
||||
#if 0//#ifdef GL_TRANSFORM_FEEDBACK_BUFFER
|
||||
if (use_transform_feedback &&
|
||||
gTransformPositionProgram.mProgramObject && //transform shaders are loaded
|
||||
mVertexBuffer->useVBOs() && //target buffer is in VRAM
|
||||
|
||||
@@ -5651,7 +5651,7 @@ void LLSelectNode::renderOneWireframe(const LLColor4& color)
|
||||
|
||||
if (shader)
|
||||
{
|
||||
gHighlightProgram.bind();
|
||||
gDebugProgram.bind();
|
||||
}
|
||||
|
||||
gGL.matrixMode(LLRender::MM_MODELVIEW);
|
||||
|
||||
@@ -4754,8 +4754,6 @@ void process_kill_object(LLMessageSystem *mesgsys, void **user_data)
|
||||
LL_DEBUGS("Messaging") << "Kill message for local " << local_id << LL_ENDL;
|
||||
}
|
||||
|
||||
LLSelectMgr::getInstance()->removeObjectFromSelections(id);
|
||||
|
||||
// ...don't kill the avatar
|
||||
if (!(id == gAgentID))
|
||||
{
|
||||
@@ -4785,6 +4783,12 @@ void process_kill_object(LLMessageSystem *mesgsys, void **user_data)
|
||||
gObjectList.mNumUnknownKills++;
|
||||
}
|
||||
}
|
||||
|
||||
// We should remove the object from selection after it is marked dead by gObjectList to make LLToolGrab,
|
||||
// which is using the object, release the mouse capture correctly when the object dies.
|
||||
// See LLToolGrab::handleHoverActive() and LLToolGrab::handleHoverNonPhysical().
|
||||
LLSelectMgr::getInstance()->removeObjectFromSelections(id);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4907,6 +4907,8 @@ void LLViewerWindow::restoreGL(const std::string& progress_message)
|
||||
|
||||
void LLViewerWindow::initFonts(F32 zoom_factor)
|
||||
{
|
||||
if(gGLManager.mIsDisabled)
|
||||
return;
|
||||
LLFontGL::destroyAllGL();
|
||||
// Initialize with possibly different zoom factor
|
||||
LLFontGL::initClass( gSavedSettings.getF32("FontScreenDPI"),
|
||||
|
||||
@@ -62,28 +62,6 @@ S32* LLVOPartGroup::sVBSlotCursor = NULL;
|
||||
//static
|
||||
void LLVOPartGroup::restoreGL()
|
||||
{
|
||||
//Just iterate over all particle faces and mark their vbo index as 'uninitialized' since sVBSlotFree & sVBSlotCursor will be clobbered.
|
||||
for (int i=0; i<gObjectList.getNumObjects(); i++)
|
||||
{
|
||||
LLViewerObject *obj = gObjectList.getObject(i);
|
||||
if(obj && obj->mDrawable)
|
||||
{
|
||||
if (obj->mDrawable->getRenderType() == LLPipeline::RENDER_TYPE_PARTICLES ||
|
||||
obj->mDrawable->getRenderType() == LLPipeline::RENDER_TYPE_HUD_PARTICLES
|
||||
#if ENABLE_CLASSIC_CLOUDS
|
||||
|| obj->mDrawable->getRenderType() == LLPipeline::RENDER_TYPE_CLASSIC_CLOUDS
|
||||
#endif
|
||||
)
|
||||
{
|
||||
for (S32 j = 0; j < obj->mDrawable->getNumFaces(); ++j)
|
||||
{
|
||||
LLFace* facep = obj->mDrawable->getFace(j);
|
||||
if(facep)
|
||||
facep->setIndicesIndex(0xFFFFFFFF);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
for (S32 i = 0; i < LL_MAX_PARTICLE_COUNT; ++i)
|
||||
{
|
||||
sVBSlotFree[i] = i;
|
||||
@@ -142,6 +120,32 @@ void LLVOPartGroup::restoreGL()
|
||||
//static
|
||||
void LLVOPartGroup::destroyGL()
|
||||
{
|
||||
//Just iterate over all particle faces and mark their vbo index as 'uninitialized' since sVBSlotFree & sVBSlotCursor will be clobbered.
|
||||
for (int i=0; i<gObjectList.getNumObjects(); i++)
|
||||
{
|
||||
LLViewerObject *obj = gObjectList.getObject(i);
|
||||
if(obj && obj->mDrawable)
|
||||
{
|
||||
if (obj->mDrawable->getRenderType() == LLPipeline::RENDER_TYPE_PARTICLES ||
|
||||
obj->mDrawable->getRenderType() == LLPipeline::RENDER_TYPE_HUD_PARTICLES
|
||||
#if ENABLE_CLASSIC_CLOUDS
|
||||
|| obj->mDrawable->getRenderType() == LLPipeline::RENDER_TYPE_CLASSIC_CLOUDS
|
||||
#endif
|
||||
)
|
||||
{
|
||||
for (S32 j = 0; j < obj->mDrawable->getNumFaces(); ++j)
|
||||
{
|
||||
LLFace* facep = obj->mDrawable->getFace(j);
|
||||
if(facep)
|
||||
facep->setIndicesIndex(0xFFFFFFFF);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
for (S32 i = 0; i < LL_MAX_PARTICLE_COUNT; ++i)
|
||||
{
|
||||
sVBSlotFree[i] = i;
|
||||
}
|
||||
sVB = NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -457,9 +457,11 @@ void LLPipeline::init()
|
||||
{
|
||||
mCubeVB = ll_create_cube_vb(LLVertexBuffer::MAP_VERTEX, GL_STATIC_DRAW_ARB);
|
||||
}
|
||||
|
||||
mDeferredVB = new LLVertexBuffer(DEFERRED_VB_MASK, 0);
|
||||
mDeferredVB->allocateBuffer(8, 0, true);
|
||||
if(mDeferredVB.isNull())
|
||||
{
|
||||
mDeferredVB = new LLVertexBuffer(DEFERRED_VB_MASK, 0);
|
||||
mDeferredVB->allocateBuffer(8, 0, true);
|
||||
}
|
||||
setLightingDetail(-1);
|
||||
gSavedSettings.getControl("RenderAutoMaskAlphaDeferred")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
|
||||
gSavedSettings.getControl("RenderAutoMaskAlphaNonDeferred")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
|
||||
@@ -468,7 +470,7 @@ void LLPipeline::init()
|
||||
//gSavedSettings.getControl("RenderDelayVBUpdate")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
|
||||
gSavedSettings.getControl("UseOcclusion")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
|
||||
gSavedSettings.getControl("VertexShaderEnable")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
|
||||
|
||||
gSavedSettings.getControl("RenderFSAASamples")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings));
|
||||
}
|
||||
|
||||
LLPipeline::~LLPipeline()
|
||||
@@ -2330,10 +2332,10 @@ void LLPipeline::updateGL()
|
||||
LLGLUpdate::sGLQ.pop_front();
|
||||
}
|
||||
|
||||
{ //seed VBO Pools
|
||||
/*{ //seed VBO Pools
|
||||
LLFastTimer t(FTM_SEED_VBO_POOLS);
|
||||
LLVertexBuffer::seedPools();
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
void LLPipeline::rebuildPriorityGroups()
|
||||
@@ -6102,6 +6104,7 @@ void LLPipeline::doResetVertexBuffers()
|
||||
mResetVertexBuffers = false;
|
||||
|
||||
mCubeVB = NULL;
|
||||
mDeferredVB = NULL;
|
||||
|
||||
for (LLWorld::region_list_t::const_iterator iter = LLWorld::getInstance()->getRegionList().begin();
|
||||
iter != LLWorld::getInstance()->getRegionList().end(); ++iter)
|
||||
@@ -7241,6 +7244,11 @@ void LLPipeline::renderDeferredLighting()
|
||||
|
||||
glh::matrix4f mat = glh_copy_matrix(gGLModelView);
|
||||
|
||||
if(mDeferredVB.isNull())
|
||||
{
|
||||
mDeferredVB = new LLVertexBuffer(DEFERRED_VB_MASK, 0);
|
||||
mDeferredVB->allocateBuffer(8, 0, true);
|
||||
}
|
||||
LLStrider<LLVector3> vert;
|
||||
mDeferredVB->getVertexStrider(vert);
|
||||
LLStrider<LLVector2> tc0;
|
||||
|
||||
Reference in New Issue
Block a user