diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 5a582678e..dff8e1b30 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -450,8 +450,6 @@ static void settings_to_globals() gShowObjectUpdates = gSavedSettings.getBOOL("ShowObjectUpdates"); LLWorldMapView::sMapScale = gSavedSettings.getF32("MapScale"); LLHoverView::sShowHoverTips = gSavedSettings.getBOOL("ShowHoverTips"); - - LLCubeMap::sUseCubeMaps = LLFeatureManager::getInstance()->isFeatureAvailable("RenderCubeMap"); } static void settings_modify() @@ -738,6 +736,9 @@ bool LLAppViewer::init() gGLActive = TRUE; initWindow(); + // initWindow also initializes the Feature List, so now we can initialize this global. + LLCubeMap::sUseCubeMaps = LLFeatureManager::getInstance()->isFeatureAvailable("RenderCubeMap"); + // call all self-registered classes LLInitClassList::instance().fireCallbacks(); diff --git a/indra/newview/llhudeffect.cpp b/indra/newview/llhudeffect.cpp index c1d46f98d..bfd62805a 100644 --- a/indra/newview/llhudeffect.cpp +++ b/indra/newview/llhudeffect.cpp @@ -38,7 +38,6 @@ #include "llgl.h" #include "llagent.h" #include "llrendersphere.h" -#include "llimagegl.h" #include "llviewerobjectlist.h" #include "lldrawable.h" diff --git a/indra/newview/llhudeffect.h b/indra/newview/llhudeffect.h index 954cda7c8..781e57fa6 100644 --- a/indra/newview/llhudeffect.h +++ b/indra/newview/llhudeffect.h @@ -37,9 +37,6 @@ #include "lluuid.h" #include "v4coloru.h" -#include "llinterp.h" -#include "llframetimer.h" -#include "llmemory.h" const F32 LL_HUD_DUR_SHORT = 1.f; diff --git a/indra/newview/llhudeffectbeam.cpp b/indra/newview/llhudeffectbeam.cpp index a7c121434..fc8fc3cd0 100644 --- a/indra/newview/llhudeffectbeam.cpp +++ b/indra/newview/llhudeffectbeam.cpp @@ -43,7 +43,6 @@ #include "llgl.h" #include "llglheaders.h" #include "llhudrender.h" -#include "llimagegl.h" #include "llrendersphere.h" #include "llviewercamera.h" #include "llvoavatar.h" diff --git a/indra/newview/llhudeffecttrail.cpp b/indra/newview/llhudeffecttrail.cpp index c01222ebc..fa69a27e0 100644 --- a/indra/newview/llhudeffecttrail.cpp +++ b/indra/newview/llhudeffecttrail.cpp @@ -35,7 +35,6 @@ #include "llhudeffecttrail.h" #include "llviewercontrol.h" -#include "llimagegl.h" #include "message.h" #include "llagent.h" diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 7f20e7e3e..b56385962 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -2957,6 +2957,16 @@ public: renderBoundingBox(drawable); } + if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_BUILD_QUEUE)) + { + if (drawable->isState(LLDrawable::IN_REBUILD_Q2)) + { + gGL.color4f(0.6f, 0.6f, 0.1f, 1.f); + const LLVector3* ext = drawable->getSpatialExtents(); + drawBoxOutline((ext[0]+ext[1])*0.5f, (ext[1]-ext[0])*0.5f); + } + } + if (drawable->getVOVolume() && gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXTURE_PRIORITY)) { renderTexturePriority(drawable); @@ -2976,6 +2986,10 @@ public: { renderRaycast(drawable); } + if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_UPDATE_TYPE)) + { + renderUpdateType(drawable); + } LLVOAvatar* avatar = dynamic_cast(drawable->getVObj().get()); @@ -3061,13 +3075,15 @@ void LLSpatialPartition::renderDebug() LLPipeline::RENDER_DEBUG_OCCLUSION | LLPipeline::RENDER_DEBUG_LIGHTS | LLPipeline::RENDER_DEBUG_BATCH_SIZE | + LLPipeline::RENDER_DEBUG_UPDATE_TYPE | LLPipeline::RENDER_DEBUG_BBOXES | LLPipeline::RENDER_DEBUG_POINTS | LLPipeline::RENDER_DEBUG_TEXTURE_PRIORITY | LLPipeline::RENDER_DEBUG_TEXTURE_ANIM | LLPipeline::RENDER_DEBUG_RAYCAST | LLPipeline::RENDER_DEBUG_AVATAR_VOLUME | - LLPipeline::RENDER_DEBUG_AGENT_TARGET)) + LLPipeline::RENDER_DEBUG_AGENT_TARGET | + LLPipeline::RENDER_DEBUG_BUILD_QUEUE)) { return; } diff --git a/indra/newview/llspatialpartition.h b/indra/newview/llspatialpartition.h index ebab60e49..5b7ce8863 100644 --- a/indra/newview/llspatialpartition.h +++ b/indra/newview/llspatialpartition.h @@ -408,7 +408,7 @@ public: BOOL mOcclusionEnabled; // if TRUE, occlusion culling is performed BOOL mInfiniteFarClip; // if TRUE, frustum culling ignores far clip plane U32 mBufferUsage; - BOOL mRenderByGroup; + const BOOL mRenderByGroup; U32 mLODSeed; U32 mLODPeriod; //number of frames between LOD updates for a given spatial group (staggered by mLODSeed) U32 mVertexDataMask; diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 765329cdc..4998a7f9e 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -119,7 +119,6 @@ void render_hud_attachments(); void render_ui_3d(); void render_ui_2d(); void render_disconnected_background(); -void render_hud_elements(); void display_startup() { @@ -681,9 +680,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) LLGLState::checkTextureChannels(); LLGLState::checkClientArrays(); - BOOL to_texture = !for_snapshot && - gPipeline.canUseVertexShaders() && - LLPipeline::sRenderGlow; + BOOL to_texture = gPipeline.canUseVertexShaders() && (LLPipeline::sRenderDeferred || (LLPipeline::sRenderGlow && !gSnapshot)); LLAppViewer::instance()->pingMainloopTimeout("Display:Swap"); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 6fb3fa9be..34ca31e78 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -1478,7 +1478,13 @@ void init_debug_rendering_menu(LLMenuGL* menu) sub_menu->append(new LLMenuItemCheckGL("Sculpt", &LLPipeline::toggleRenderDebug, NULL, &LLPipeline::toggleRenderDebugControl, (void*)LLPipeline::RENDER_DEBUG_SCULPTED)); - + sub_menu->append(new LLMenuItemCheckGL("Build Queue", &LLPipeline::toggleRenderDebug, NULL, + &LLPipeline::toggleRenderDebugControl, + (void*)LLPipeline::RENDER_DEBUG_BUILD_QUEUE)); + sub_menu->append(new LLMenuItemCheckGL("Update Types", &LLPipeline::toggleRenderDebug, NULL, + &LLPipeline::toggleRenderDebugControl, + (void*)LLPipeline::RENDER_DEBUG_UPDATE_TYPE)); + sub_menu->append(new LLMenuItemCallGL("Vectorize Perf Test", &run_vectorize_perf_test)); sub_menu = new LLMenuGL("Render Tests"); diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index ade4a343b..0eb19b92d 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -337,11 +337,6 @@ void LLVOVolume::animateTextures() te->getScale(&scale_s, &scale_t); } - LLVector3 scale(scale_s, scale_t, 1.f); - LLVector3 trans(off_s+0.5f, off_t+0.5f, 0.f); - LLQuaternion quat; - quat.setQuat(rot, 0, 0, -1.f); - if (!facep->mTextureMatrix) { facep->mTextureMatrix = new LLMatrix4(); @@ -349,7 +344,16 @@ void LLVOVolume::animateTextures() LLMatrix4& tex_mat = *facep->mTextureMatrix; tex_mat.setIdentity(); - tex_mat.translate(LLVector3(-0.5f, -0.5f, 0.f)); + LLVector3 trans ; + { + trans.set(LLVector3(off_s+0.5f, off_t+0.5f, 0.f)); + tex_mat.translate(LLVector3(-0.5f, -0.5f, 0.f)); + } + + LLVector3 scale(scale_s, scale_t, 1.f); + LLQuaternion quat; + quat.setQuat(rot, 0, 0, -1.f); + tex_mat.rotate(quat); LLMatrix4 mat; @@ -892,9 +896,7 @@ BOOL LLVOVolume::calcLOD() if (distance < rampDist) { // Boost LOD when you're REALLY close - distance *= 1.0f/rampDist; - distance *= distance; - distance *= rampDist; + distance *= distance/rampDist; } // DON'T Compensate for field of view changing on FOV zoom. @@ -2228,7 +2230,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, U8 glow = 0; - if (type == LLRenderPass::PASS_GLOW) + if (type == LLRenderPass::PASS_GLOW || type==LLRenderPass::PASS_ALPHA) //Alpha pass now handles glow internally { glow = (U8) (facep->getTextureEntry()->getGlow() * 255); } @@ -2766,7 +2768,9 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std:: // can we safely treat this as an alpha mask? if (facep->canRenderAsMask()) { - if (te->getFullbright()) + const LLDrawable* drawablep = facep->getDrawable(); + const LLVOVolume* vobj = drawablep ? drawablep->getVOVolume() : NULL; + if (te->getFullbright() || (vobj && vobj->isHUDAttachment())) { registerFace(group, facep, LLRenderPass::PASS_FULLBRIGHT_ALPHA_MASK); } @@ -2862,7 +2866,7 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std:: } } - if (LLPipeline::sRenderGlow && te->getGlow() > 0.f) + if (!is_alpha && LLPipeline::sRenderGlow && te->getGlow() > 0.f) { registerFace(group, facep, LLRenderPass::PASS_GLOW); } diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 15a05e13c..c1299f3ac 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -146,6 +146,7 @@ const LLMatrix4* gGLLastMatrix = NULL; std::string gPoolNames[] = { // Correspond to LLDrawpool enum render type + "NONE", "POOL_SIMPLE", "POOL_TERRAIN", "POOL_BUMP", @@ -380,6 +381,7 @@ void LLPipeline::init() LLViewerShaderMgr::instance()->setShaders(); stop_glerror(); + setLightingDetail(-1); } LLPipeline::~LLPipeline() @@ -452,8 +454,6 @@ void LLPipeline::cleanup() releaseGLBuffers(); - mBloomImagep = NULL; - mBloomImage2p = NULL; mFaceSelectImagep = NULL; mMovedBridge.clear(); @@ -558,13 +558,12 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY) //static void LLPipeline::updateRenderDeferred() { - BOOL deferred = (gSavedSettings.getBOOL("RenderDeferred") && + sRenderDeferred = (gSavedSettings.getBOOL("RenderDeferred") && LLRenderTarget::sUseFBO && gSavedSettings.getBOOL("VertexShaderEnable") && gSavedSettings.getBOOL("RenderAvatarVP") && - gSavedSettings.getBOOL("WindLightUseAtmosShaders")) ? TRUE : FALSE; - - sRenderDeferred = deferred; + gSavedSettings.getBOOL("WindLightUseAtmosShaders") && + !gUseWireframe); } void LLPipeline::releaseGLBuffers() @@ -1398,6 +1397,7 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_cl gGLLastMatrix = NULL; glLoadMatrixd(gGLLastModelView); + LLVertexBuffer::unbind(); LLGLDisable blend(GL_BLEND); LLGLDisable test(GL_ALPHA_TEST); @@ -1475,10 +1475,10 @@ void LLPipeline::updateCull(LLCamera& camera, LLCullResult& result, S32 water_cl { mScreen.flush(); } - /*else if (LLPipeline::sUseOcclusion > 1) + else if (LLPipeline::sUseOcclusion > 1) { glFlush(); - }*/ + } } void LLPipeline::markNotCulled(LLSpatialGroup* group, LLCamera& camera) @@ -2372,6 +2372,7 @@ void LLPipeline::postSort(LLCamera& camera) assertInitialized(); + llpushcallstacks ; //rebuild drawable geometry for (LLCullResult::sg_list_t::iterator i = sCull->beginDrawableGroups(); i != sCull->endDrawableGroups(); ++i) { @@ -2382,7 +2383,7 @@ void LLPipeline::postSort(LLCamera& camera) group->rebuildGeom(); } } - + llpushcallstacks ; //rebuild groups sCull->assertDrawMapsEmpty(); @@ -2400,10 +2401,10 @@ void LLPipeline::postSort(LLCamera& camera) } LLSpatialGroup::sNoDelete = TRUE;*/ + rebuildPriorityGroups(); - - - + llpushcallstacks ; + const S32 bin_count = 1024*8; static LLCullResult::drawinfo_list_t alpha_bins[bin_count]; @@ -2504,7 +2505,7 @@ void LLPipeline::postSort(LLCamera& camera) std::sort(sCull->beginAlphaGroups(), sCull->endAlphaGroups(), LLSpatialGroup::CompareDepthGreater()); } - + llpushcallstacks ; // only render if the flag is set. The flag is only set if we are in edit mode or the toggle is set in the menus static const LLCachedControl beacon_always_on("BeaconAlwaysOn",false); if (beacon_always_on && !sShadowRender) @@ -2553,7 +2554,7 @@ void LLPipeline::postSort(LLCamera& camera) forAllVisibleDrawables(renderSoundHighlights); } } - + llpushcallstacks ; // If managing your telehub, draw beacons at telehub and currently selected spawnpoint. if (LLFloaterTelehub::renderBeacons()) { @@ -2583,6 +2584,7 @@ void LLPipeline::postSort(LLCamera& camera) } //LLSpatialGroup::sNoDelete = FALSE; + llpushcallstacks ; } @@ -2615,7 +2617,12 @@ void render_hud_elements() // Render debugging beacons. //gObjectList.renderObjectBeacons(); - //LLHUDObject::renderAll(); + + //TO-DO: + //V2 moved this line from LLPipeline::renderGeom + //Uncomment once multisample z-buffer issues are figured out on ati cards. + // LLHUDObject::renderAll(); + //gObjectList.resetObjectBeacons(); } else if (gForceRenderLandFence) @@ -2938,6 +2945,9 @@ void LLPipeline::renderGeom(LLCamera& camera, BOOL forceVBOUpdate) { // Render debugging beacons. gObjectList.renderObjectBeacons(); + //TO-DO: + //V2 moved this line to LLPipeline::render_hud_elements + //Migrate once multisample z-buffer issues are figured out on ati cards. LLHUDObject::renderAll(); gObjectList.resetObjectBeacons(); } @@ -3167,26 +3177,32 @@ void LLPipeline::renderGeomPostDeferred(LLCamera& camera) gGLLastMatrix = NULL; glLoadMatrixd(gGLModelView); - renderHighlights(); - mHighlightFaces.clear(); - - renderDebug(); - - LLVertexBuffer::unbind(); - - if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI)) + //TO-DO: + //V2 moved block to LLPipeline::renderDeferredLighting + //Migrate once multisample z-buffer issues are figured out on ati cards. { - // Render debugging beacons. - gObjectList.renderObjectBeacons(); - LLHUDObject::renderAll(); - gObjectList.resetObjectBeacons(); - } - else - { - // Make sure particle effects disappear - LLHUDObject::renderAllForTimer(); - } + renderHighlights(); + mHighlightFaces.clear(); + renderDebug(); + + LLVertexBuffer::unbind(); + + if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI)) + { + // Render debugging beacons. + gObjectList.renderObjectBeacons(); + LLHUDObject::renderAll(); + gObjectList.resetObjectBeacons(); + } + else + { + // Make sure particle effects disappear + LLHUDObject::renderAllForTimer(); + } + } + //END + if (occlude) { occlude = FALSE; @@ -3282,6 +3298,9 @@ void LLPipeline::renderDebug() { LLMemType mt(LLMemType::MTYPE_PIPELINE); + if(!mRenderDebugMask) + return; + assertInitialized(); gGL.color4f(1,1,1,1); @@ -3446,6 +3465,55 @@ void LLPipeline::renderDebug() } } + if (mRenderDebugMask & LLPipeline::RENDER_DEBUG_BUILD_QUEUE) + { + U32 count = 0; + U32 size = mBuildQ2.size(); + LLColor4 col; + + LLGLEnable blend(GL_BLEND); + LLGLDepthTest depth(GL_TRUE, GL_FALSE); + gGL.getTexUnit(0)->bind(LLViewerImage::sWhiteImagep.get()); + + for (LLSpatialGroup::sg_vector_t::iterator iter = mGroupQ2.begin(); iter != mGroupQ2.end(); ++iter) + { + LLSpatialGroup* group = *iter; + if (group->isDead()) + { + continue; + } + + LLSpatialBridge* bridge = group->mSpatialPartition->asBridge(); + + if (bridge && (!bridge->mDrawable || bridge->mDrawable->isDead())) + { + continue; + } + + if (bridge) + { + gGL.pushMatrix(); + glMultMatrixf((F32*)bridge->mDrawable->getRenderMatrix().mMatrix); + } + + F32 alpha = (F32) (size-count)/size; + + + LLVector2 c(1.f-alpha, alpha); + c.normVec(); + + + ++count; + col.set(c.mV[0], c.mV[1], 0, alpha*0.5f+0.1f); + group->drawObjectBox(col); + + if (bridge) + { + gGL.popMatrix(); + } + } + } + gGL.flush(); } @@ -4257,32 +4325,28 @@ void LLPipeline::setupHWLights(LLDrawPool* pool) LLVector4 light_pos_gl(light_pos, 1.0f); F32 light_radius = llmax(light->getLightRadius(), 0.001f); - F32 atten, quad; -#if 0 //1.9.1 - if (pool->getVertexShaderLevel() > 0) - { - atten = light_radius; - quad = llmax(light->getLightFalloff(), 0.0001f); - } - else -#endif - { - F32 x = (3.f * (1.f + light->getLightFalloff())); - atten = x / (light_radius); // % of brightness at radius - quad = 0.0f; - } + F32 x = (3.f * (1.f + light->getLightFalloff())); // why this magic? probably trying to match a historic behavior. + float linatten = x / (light_radius); // % of brightness at radius + mHWLightColors[cur_light] = light_color; S32 gllight = GL_LIGHT0+cur_light; glLightfv(gllight, GL_POSITION, light_pos_gl.mV); glLightfv(gllight, GL_DIFFUSE, light_color.mV); glLightfv(gllight, GL_AMBIENT, LLColor4::black.mV); - glLightfv(gllight, GL_SPECULAR, LLColor4::black.mV); glLightf (gllight, GL_CONSTANT_ATTENUATION, 0.0f); - glLightf (gllight, GL_LINEAR_ATTENUATION, atten); - glLightf (gllight, GL_QUADRATIC_ATTENUATION, quad); - glLightf (gllight, GL_SPOT_EXPONENT, 0.0f); - glLightf (gllight, GL_SPOT_CUTOFF, 180.0f); + glLightf (gllight, GL_LINEAR_ATTENUATION, linatten); + glLightf (gllight, GL_QUADRATIC_ATTENUATION, 0.0f); + //Point lights + { + glLightf (gllight, GL_SPOT_EXPONENT, 0.0f); + glLightf (gllight, GL_SPOT_CUTOFF, 180.0f); + + // we use specular.w = 1.0 as a cheap hack for the shaders to know that this is omnidirectional rather than a spotlight + const float specular[] = {0.f, 0.f, 0.f, 1.f}; + glLightfv(gllight, GL_SPECULAR, specular); + //llinfos << "boring light" << llendl; + } cur_light++; if (cur_light >= 8) { @@ -4299,7 +4363,7 @@ void LLPipeline::setupHWLights(LLDrawPool* pool) glLightfv(gllight, GL_SPECULAR, LLColor4::black.mV); } - if (gAgent.getAvatarObject() && + if (isAgentAvatarValid() && gAgent.getAvatarObject()->mSpecialRenderMode == 3) { LLColor4 light_color = LLColor4::white; @@ -4309,13 +4373,10 @@ void LLPipeline::setupHWLights(LLDrawPool* pool) LLVector4 light_pos_gl(light_pos, 1.0f); F32 light_radius = 16.f; - F32 atten, quad; - { F32 x = 3.f; - atten = x / (light_radius); // % of brightness at radius - quad = 0.0f; - } + float linatten = x / (light_radius); // % of brightness at radius + mHWLightColors[2] = light_color; S32 gllight = GL_LIGHT2; glLightfv(gllight, GL_POSITION, light_pos_gl.mV); @@ -4323,8 +4384,8 @@ void LLPipeline::setupHWLights(LLDrawPool* pool) glLightfv(gllight, GL_AMBIENT, LLColor4::black.mV); glLightfv(gllight, GL_SPECULAR, LLColor4::black.mV); glLightf (gllight, GL_CONSTANT_ATTENUATION, 0.0f); - glLightf (gllight, GL_LINEAR_ATTENUATION, atten); - glLightf (gllight, GL_QUADRATIC_ATTENUATION, quad); + glLightf (gllight, GL_LINEAR_ATTENUATION, linatten); + glLightf (gllight, GL_QUADRATIC_ATTENUATION, 0.0f); glLightf (gllight, GL_SPOT_EXPONENT, 0.0f); glLightf (gllight, GL_SPOT_CUTOFF, 180.0f); } @@ -4341,6 +4402,7 @@ void LLPipeline::setupHWLights(LLDrawPool* pool) void LLPipeline::enableLights(U32 mask) { assertInitialized(); + if (mLightingDetail == 0) { mask &= 0xf003; // sun and backlight only (and fullbright bit) @@ -5528,6 +5590,14 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) gGL.getTexUnit(0)->activate(); gGL.getTexUnit(0)->setTextureBlendType(LLTexUnit::TB_MULT); + //TO-DO: + //V2 requires this for hover text and such since they have been pulled out of geom render. + //Do this when multisample z-buffer issues are figured out + /*if (LLRenderTarget::sUseFBO) + { //copy depth buffer from mScreen to framebuffer + LLRenderTarget::copyContentsToFramebuffer(mScreen, 0, 0, mScreen.getWidth(), mScreen.getHeight(), + 0, 0, mScreen.getWidth(), mScreen.getHeight(), GL_DEPTH_BUFFER_BIT, GL_NEAREST); + }*/ } @@ -5836,6 +5906,9 @@ void LLPipeline::renderDeferredLighting() { LLGLDisable blend(GL_BLEND); + //TO-DO: + //V2 changed to LLGLDepthTest depth(GL_TRUE, GL_FALSE, GL_ALWAYS); + //Do this when multisample z-buffer issues are figured out LLGLDepthTest depth(GL_FALSE); stop_glerror(); glDrawArrays(GL_TRIANGLE_STRIP, 0, 3); @@ -5852,6 +5925,9 @@ void LLPipeline::renderDeferredLighting() { LLGLDisable blend(GL_BLEND); + //TO-DO: + //V2 changed to LLGLDepthTest depth(GL_TRUE, GL_FALSE, GL_ALWAYS); + //Do this when multisample z-buffer issues are figured out LLGLDepthTest depth(GL_FALSE); stop_glerror(); glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); @@ -6088,6 +6164,26 @@ void LLPipeline::renderDeferredLighting() popRenderTypeMask(); } + //TO-DO: + //V2 moved block from LLPipeline::renderGeomPostDeferred + //Migrate once multisample z-buffer issues are figured out on ati cards. + /*{ + //render highlights, etc. + renderHighlights(); + mHighlightFaces.clear(); + + renderDebug(); + + LLVertexBuffer::unbind(); + + if (gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI)) + { + // Render debugging beacons. + gObjectList.renderObjectBeacons(); + gObjectList.resetObjectBeacons(); + } + }*/ + mScreen.flush(); } @@ -6251,48 +6347,47 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in) gPipeline.popRenderTypeMask(); } - gPipeline.pushRenderTypeMask(); - - clearRenderTypeMask(LLPipeline::RENDER_TYPE_WATER, - LLPipeline::RENDER_TYPE_VOIDWATER, - LLPipeline::RENDER_TYPE_GROUND, - LLPipeline::RENDER_TYPE_SKY, - LLPipeline::RENDER_TYPE_CLASSIC_CLOUDS, - LLPipeline::RENDER_TYPE_WL_CLOUDS, - LLPipeline::END_RENDER_TYPES); if (gSavedSettings.getBOOL("RenderWaterReflections")) { //mask out selected geometry based on reflection detail S32 detail = gSavedSettings.getS32("RenderReflectionDetail"); - if (detail > 0) + //if (detail > 0) { //mask out selected geometry based on reflection detail { - if (detail < 4) - { - clearRenderTypeMask(LLPipeline::RENDER_TYPE_PARTICLES, END_RENDER_TYPES); + gPipeline.pushRenderTypeMask(); if (detail < 3) { - clearRenderTypeMask(LLPipeline::RENDER_TYPE_AVATAR, END_RENDER_TYPES); + clearRenderTypeMask(LLPipeline::RENDER_TYPE_PARTICLES, END_RENDER_TYPES); if (detail < 2) { + clearRenderTypeMask(LLPipeline::RENDER_TYPE_AVATAR, END_RENDER_TYPES); + if (detail < 1) + { clearRenderTypeMask(LLPipeline::RENDER_TYPE_VOLUME, END_RENDER_TYPES); } } } + + clearRenderTypeMask(LLPipeline::RENDER_TYPE_WATER, + LLPipeline::RENDER_TYPE_VOIDWATER, + LLPipeline::RENDER_TYPE_GROUND, + LLPipeline::RENDER_TYPE_SKY, + LLPipeline::RENDER_TYPE_CLASSIC_CLOUDS, + LLPipeline::RENDER_TYPE_WL_CLOUDS, + LLPipeline::END_RENDER_TYPES); static LLCachedControl skip_distortion_updates("SkipReflectOcclusionUpdates",false); LLPipeline::sSkipUpdate = skip_distortion_updates; LLGLUserClipPlane clip_plane(plane, mat, projection); LLGLDisable cull(GL_CULL_FACE); updateCull(camera, ref_result, 1); stateSort(camera, ref_result); + gPipeline.grabReferences(ref_result); + renderGeom(camera); + LLPipeline::sSkipUpdate = FALSE; + gPipeline.popRenderTypeMask(); } - gPipeline.grabReferences(ref_result); - LLGLUserClipPlane clip_plane(plane, mat, projection); - renderGeom(camera); - LLPipeline::sSkipUpdate = FALSE; } } - gPipeline.popRenderTypeMask(); } glCullFace(GL_BACK); glPopMatrix(); diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index 36f4c33ec..a7b318c60 100644 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -397,7 +397,9 @@ public: RENDER_DEBUG_SHADOW_FRUSTA = 0x0040000, RENDER_DEBUG_SCULPTED = 0x0080000, RENDER_DEBUG_AVATAR_VOLUME = 0x0100000, - RENDER_DEBUG_AGENT_TARGET = 0x0200000, + RENDER_DEBUG_BUILD_QUEUE = 0x0200000, + RENDER_DEBUG_AGENT_TARGET = 0x0400000, + RENDER_DEBUG_UPDATE_TYPE = 0x0800000, }; public: @@ -602,8 +604,6 @@ protected: std::vector mSelectedFaces; LLPointer mFaceSelectImagep; - LLPointer mBloomImagep; - LLPointer mBloomImage2p; U32 mLightMask; U32 mLightMovingMask; @@ -620,6 +620,7 @@ public: }; void render_bbox(const LLVector3 &min, const LLVector3 &max); +void render_hud_elements(); extern LLPipeline gPipeline; extern BOOL gRenderForSelect; diff --git a/indra/newview/skins/default/xui/en-us/panel_group_general.xml b/indra/newview/skins/default/xui/en-us/panel_group_general.xml index 4580ed72e..20f75ecbb 100644 --- a/indra/newview/skins/default/xui/en-us/panel_group_general.xml +++ b/indra/newview/skins/default/xui/en-us/panel_group_general.xml @@ -80,23 +80,23 @@ Hover your mouse over the options for more help. - + Group Preferences - - - - + Content Rating + + @@ -124,29 +127,27 @@ Hover your mouse over the options for more help. - - - My Active Title - - - - - - + + + My Active Title + + + Retrieving member data