From fbfe7418e567b79c60cc873a8882d9be97e3bb0a Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Sat, 20 Nov 2010 07:25:09 -0500 Subject: Moved Enable Hints to 2nd line of Help menu --- indra/newview/skins/default/xui/en/menu_viewer.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 27ab7c4fbd..907f68dc06 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -990,6 +990,14 @@ function="ShowHelp" parameter="f1_help" /> + + + + - - diff --git a/indra/newview/app_settings/low_graphics.xml b/indra/newview/app_settings/low_graphics.xml index 136087f69b..a5bbdfc1d0 100644 --- a/indra/newview/app_settings/low_graphics.xml +++ b/indra/newview/app_settings/low_graphics.xml @@ -26,8 +26,6 @@ - - diff --git a/indra/newview/app_settings/mid_graphics.xml b/indra/newview/app_settings/mid_graphics.xml index c150a87cdf..a1430a58f9 100644 --- a/indra/newview/app_settings/mid_graphics.xml +++ b/indra/newview/app_settings/mid_graphics.xml @@ -24,8 +24,6 @@ - - diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 61d6397109..002e847492 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -8700,17 +8700,6 @@ Value 0 - RenderUseFBO - - Comment - Whether we want to use GL_EXT_framebuffer_objects. - Persist - 1 - Type - Boolean - Value - 1 - RenderUseTriStrips Comment diff --git a/indra/newview/app_settings/ultra_graphics.xml b/indra/newview/app_settings/ultra_graphics.xml index e7dce3b989..f741089ca2 100644 --- a/indra/newview/app_settings/ultra_graphics.xml +++ b/indra/newview/app_settings/ultra_graphics.xml @@ -24,8 +24,6 @@ - - diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 4f80ba3aeb..e8fe073d02 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -466,7 +466,7 @@ static void settings_to_globals() static void settings_modify() { - LLRenderTarget::sUseFBO = gSavedSettings.getBOOL("RenderUseFBO"); + LLRenderTarget::sUseFBO = gSavedSettings.getBOOL("RenderDeferred"); LLVOAvatar::sUseImpostors = gSavedSettings.getBOOL("RenderUseImpostors"); LLVOSurfacePatch::sLODFactor = gSavedSettings.getF32("RenderTerrainLODFactor"); LLVOSurfacePatch::sLODFactor *= LLVOSurfacePatch::sLODFactor; //square lod factor to get exponential range of [1,4] diff --git a/indra/newview/llfloaterhardwaresettings.cpp b/indra/newview/llfloaterhardwaresettings.cpp index 1e91710552..42ec7d765b 100644 --- a/indra/newview/llfloaterhardwaresettings.cpp +++ b/indra/newview/llfloaterhardwaresettings.cpp @@ -50,7 +50,6 @@ LLFloaterHardwareSettings::LLFloaterHardwareSettings(const LLSD& key) // but init them anyway mUseVBO(0), mUseAniso(0), - mUseFBO(0), mFSAASamples(0), mGamma(0.0), mVideoCardMem(0), @@ -75,7 +74,6 @@ void LLFloaterHardwareSettings::refresh() mUseVBO = gSavedSettings.getBOOL("RenderVBOEnable"); mUseAniso = gSavedSettings.getBOOL("RenderAnisotropic"); - mUseFBO = gSavedSettings.getBOOL("RenderUseFBO"); mFSAASamples = gSavedSettings.getU32("RenderFSAASamples"); mGamma = gSavedSettings.getF32("RenderGamma"); mVideoCardMem = gSavedSettings.getS32("TextureMemory"); @@ -104,7 +102,7 @@ void LLFloaterHardwareSettings::refreshEnabledState() getChildView("(brightness, lower is brighter)")->setEnabled(!gPipeline.canUseWindLightShaders()); getChildView("fog")->setEnabled(!gPipeline.canUseWindLightShaders()); getChildView("fsaa")->setEnabled(gPipeline.canUseAntiAliasing()); - getChildView("antialiasing restart")->setVisible(!gSavedSettings.getBOOL("RenderUseFBO")); + getChildView("antialiasing restart")->setVisible(!gSavedSettings.getBOOL("RenderDeferred")); /* Enable to reset fsaa value to disabled when feature is not available. if (!gPipeline.canUseAntiAliasing()) @@ -139,7 +137,6 @@ void LLFloaterHardwareSettings::cancel() { gSavedSettings.setBOOL("RenderVBOEnable", mUseVBO); gSavedSettings.setBOOL("RenderAnisotropic", mUseAniso); - gSavedSettings.setBOOL("RenderUseFBO", mUseFBO); gSavedSettings.setU32("RenderFSAASamples", mFSAASamples); gSavedSettings.setF32("RenderGamma", mGamma); gSavedSettings.setS32("TextureMemory", mVideoCardMem); diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 2bea3d37ff..741388af41 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -903,8 +903,7 @@ void LLFloaterPreference::refreshEnabledState() //Deferred/SSAO/Shadows LLCheckBoxCtrl* ctrl_deferred = getChild("UseLightShaders"); - if (LLFeatureManager::getInstance()->isFeatureAvailable("RenderUseFBO") && - LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") && + if (LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") && shaders) { BOOL enabled = (ctrl_wind_light->get()) ? TRUE : FALSE; diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp index 13dee0c7b7..4fd4368df8 100644 --- a/indra/newview/llviewercontrol.cpp +++ b/indra/newview/llviewercontrol.cpp @@ -369,11 +369,12 @@ static bool handleRenderDynamicLODChanged(const LLSD& newvalue) return true; } -static bool handleRenderUseFBOChanged(const LLSD& newvalue) +static bool handleRenderDeferredChanged(const LLSD& newvalue) { LLRenderTarget::sUseFBO = newvalue.asBoolean(); if (gPipeline.isInit()) { + gPipeline.updateRenderDeferred(); gPipeline.releaseGLBuffers(); gPipeline.createGLBuffers(); if (LLPipeline::sRenderDeferred && LLRenderTarget::sUseFBO) @@ -584,13 +585,12 @@ void settings_setup_listeners() gSavedSettings.getControl("RenderAutoMaskAlphaNonDeferred")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2)); gSavedSettings.getControl("RenderObjectBump")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2)); gSavedSettings.getControl("RenderMaxVBOSize")->getSignal()->connect(boost::bind(&handleResetVertexBuffersChanged, _2)); - gSavedSettings.getControl("RenderUseFBO")->getSignal()->connect(boost::bind(&handleRenderUseFBOChanged, _2)); gSavedSettings.getControl("RenderDeferredNoise")->getSignal()->connect(boost::bind(&handleReleaseGLBufferChanged, _2)); gSavedSettings.getControl("RenderUseImpostors")->getSignal()->connect(boost::bind(&handleRenderUseImpostorsChanged, _2)); gSavedSettings.getControl("RenderDebugGL")->getSignal()->connect(boost::bind(&handleRenderDebugGLChanged, _2)); gSavedSettings.getControl("RenderDebugPipeline")->getSignal()->connect(boost::bind(&handleRenderDebugPipelineChanged, _2)); gSavedSettings.getControl("RenderResolutionDivisor")->getSignal()->connect(boost::bind(&handleRenderResolutionDivisorChanged, _2)); - gSavedSettings.getControl("RenderDeferred")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2)); + gSavedSettings.getControl("RenderDeferred")->getSignal()->connect(boost::bind(&handleRenderDeferredChanged, _2)); gSavedSettings.getControl("RenderShadowDetail")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2)); gSavedSettings.getControl("RenderDeferredSSAO")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2)); gSavedSettings.getControl("RenderDeferredGI")->getSignal()->connect(boost::bind(&handleSetShaderChanged, _2)); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 1fa99b4a8a..23b39b8b24 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -2029,7 +2029,7 @@ class LLAdvancedEnableRenderDeferred: public view_listener_t { bool handleEvent(const LLSD& userdata) { - bool new_value = gSavedSettings.getBOOL("RenderUseFBO") && LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_WINDLIGHT > 0) && + bool new_value = gGLManager.mHasFramebufferObject && LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_WINDLIGHT > 0) && LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_AVATAR) > 0; return new_value; } @@ -2042,7 +2042,7 @@ class LLAdvancedEnableRenderDeferredOptions: public view_listener_t { bool handleEvent(const LLSD& userdata) { - bool new_value = gSavedSettings.getBOOL("RenderUseFBO") && gSavedSettings.getBOOL("RenderDeferred"); + bool new_value = gSavedSettings.getBOOL("RenderDeferred"); return new_value; } }; diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp index a16257940e..7c84357de8 100644 --- a/indra/newview/llviewershadermgr.cpp +++ b/indra/newview/llviewershadermgr.cpp @@ -415,9 +415,6 @@ void LLViewerShaderMgr::setShaders() deferred_class = 1; } - //make sure framebuffer objects are enabled - gSavedSettings.setBOOL("RenderUseFBO", TRUE); - //make sure hardware skinning is enabled gSavedSettings.setBOOL("RenderAvatarVP", TRUE); diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 20d9f49a3e..fefd387c91 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1430,7 +1430,7 @@ LLViewerWindow::LLViewerWindow( gSavedSettings.getBOOL("DisableVerticalSync"), !gNoRender, ignore_pixel_depth, - gSavedSettings.getBOOL("RenderUseFBO") ? 0 : gSavedSettings.getU32("RenderFSAASamples")); //don't use window level anti-aliasing if FBOs are enabled + gSavedSettings.getBOOL("RenderDeferred") ? 0 : gSavedSettings.getU32("RenderFSAASamples")); //don't use window level anti-aliasing if FBOs are enabled if (!LLAppViewer::instance()->restoreErrorTrap()) { @@ -4183,7 +4183,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei { mWindowRectRaw = window_rect; target.flush(); - glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); + glBindFramebufferARB(GL_FRAMEBUFFER, 0); } gDisplaySwapBuffers = FALSE; gDepthDirty = TRUE; diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 78d1044ff3..e3f397e291 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -563,6 +563,11 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY) //never use more than 4 samples for render targets U32 samples = llmin(gSavedSettings.getU32("RenderFSAASamples"), (U32) 4); + if (gGLManager.mIsATI) + { //disable multisampling of render targets where ATI is involved + samples = 0; + } + U32 res_mod = gSavedSettings.getU32("RenderResolutionDivisor"); if (res_mod > 1 && res_mod < resX && res_mod < resY) @@ -691,8 +696,7 @@ void LLPipeline::allocateScreenBuffer(U32 resX, U32 resY) mScreen.allocate(resX, resY, GL_RGBA, TRUE, TRUE, LLTexUnit::TT_RECT_TEXTURE, FALSE); } - - if (LLRenderTarget::sUseFBO && gGLManager.mHasFramebufferMultisample && samples > 1) + if (LLRenderTarget::sUseFBO && samples > 1) { mSampleBuffer.allocate(resX,resY,GL_RGBA,TRUE,TRUE,LLTexUnit::TT_RECT_TEXTURE,FALSE,samples); if (LLPipeline::sRenderDeferred) @@ -977,7 +981,7 @@ BOOL LLPipeline::canUseWindLightShadersOnObjects() const BOOL LLPipeline::canUseAntiAliasing() const { - return TRUE; //(gSavedSettings.getBOOL("RenderUseFBO")); + return TRUE; } void LLPipeline::unloadShaders() @@ -6031,21 +6035,21 @@ void apply_cube_face_rotation(U32 face) void validate_framebuffer_object() { GLenum status; - status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT); + status = glCheckFramebufferStatusARB(GL_FRAMEBUFFER_EXT); switch(status) { - case GL_FRAMEBUFFER_COMPLETE_EXT: + case GL_FRAMEBUFFER_COMPLETE: //framebuffer OK, no error. break; - case GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT: + case GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: // frame buffer not OK: probably means unsupported depth buffer format - llerrs << "Framebuffer Incomplete Dimensions." << llendl; + llerrs << "Framebuffer Incomplete Missing Attachment." << llendl; break; - case GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT: + case GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT: // frame buffer not OK: probably means unsupported depth buffer format llerrs << "Framebuffer Incomplete Attachment." << llendl; break; - case GL_FRAMEBUFFER_UNSUPPORTED_EXT: + case GL_FRAMEBUFFER_UNSUPPORTED: /* choose different formats */ llerrs << "Framebuffer unsupported." << llendl; break; @@ -6283,7 +6287,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) if (LLRenderTarget::sUseFBO) { LLFastTimer ftm(FTM_RENDER_BLOOM_FBO); - glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); + glBindFramebufferARB(GL_FRAMEBUFFER, 0); } gGLViewport[0] = gViewerWindow->getWorldViewRectRaw().mLeft; @@ -7034,7 +7038,7 @@ void LLPipeline::renderDeferredLighting() mLuminanceMap.flush(); gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mLuminanceMap.getTexture(), true); gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_TRILINEAR); - glGenerateMipmapEXT(GL_TEXTURE_2D); + glGenerateMipmapARB(GL_TEXTURE_2D); } } diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 7bb4c93766..cc21dcc202 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -2278,19 +2278,6 @@ - - - - - - Date: Fri, 3 Dec 2010 00:39:23 -0600 Subject: Remove RenderUseFBO from featuretables. --- indra/newview/featuretable.txt | 7 ------- indra/newview/featuretable_linux.txt | 6 ------ indra/newview/featuretable_mac.txt | 7 ------- indra/newview/featuretable_xp.txt | 6 ------ 4 files changed, 26 deletions(-) (limited to 'indra') diff --git a/indra/newview/featuretable.txt b/indra/newview/featuretable.txt index 7d3930ac99..e658f86627 100644 --- a/indra/newview/featuretable.txt +++ b/indra/newview/featuretable.txt @@ -61,10 +61,8 @@ RenderDeferred 1 1 SkyUseClassicClouds 1 1 RenderDeferredSSAO 1 1 RenderShadowDetail 1 2 -RenderUseFBO 1 1 WatchdogDisabled 1 1 RenderUseStreamVBO 1 1 -RenderUseFBO 1 1 // // Low Graphics Settings @@ -95,7 +93,6 @@ SkyUseClassicClouds 1 0 RenderDeferred 1 0 RenderDeferredSSAO 1 0 RenderShadowDetail 1 0 -RenderUseFBO 1 0 // // Mid Graphics Settings @@ -124,7 +121,6 @@ WLSkyDetail 1 48 RenderDeferred 1 0 RenderDeferredSSAO 1 0 RenderShadowDetail 1 0 -RenderUseFBO 1 0 // // High Graphics Settings (purty) @@ -153,7 +149,6 @@ WLSkyDetail 1 48 RenderDeferred 1 0 RenderDeferredSSAO 1 0 RenderShadowDetail 1 0 -RenderUseFBO 1 0 // // Ultra graphics (REALLY PURTY!) @@ -182,7 +177,6 @@ WLSkyDetail 1 128 RenderDeferred 1 1 RenderDeferredSSAO 1 1 RenderShadowDetail 1 2 -RenderUseFBO 1 0 // // Class Unknown Hardware (unknown) @@ -259,7 +253,6 @@ WindLightUseAtmosShaders 0 0 RenderDeferred 0 0 RenderDeferredSSAO 0 0 RenderShadowDetail 0 0 -RenderUseFBO 1 0 // diff --git a/indra/newview/featuretable_linux.txt b/indra/newview/featuretable_linux.txt index 3c63405798..087fb828f6 100644 --- a/indra/newview/featuretable_linux.txt +++ b/indra/newview/featuretable_linux.txt @@ -61,7 +61,6 @@ RenderDeferred 1 0 RenderDeferred 1 1 RenderDeferredSSAO 1 1 RenderShadowDetail 1 2 -RenderUseFBO 1 1 // // Low Graphics Settings @@ -91,7 +90,6 @@ SkyUseClassicClouds 1 0 RenderDeferred 1 0 RenderDeferredSSAO 1 0 RenderShadowDetail 1 0 -RenderUseFBO 1 0 // // Mid Graphics Settings @@ -119,7 +117,6 @@ WLSkyDetail 1 48 RenderDeferred 1 0 RenderDeferredSSAO 1 0 RenderShadowDetail 1 0 -RenderUseFBO 1 0 // // High Graphics Settings (purty) @@ -147,7 +144,6 @@ WLSkyDetail 1 48 RenderDeferred 1 0 RenderDeferredSSAO 1 0 RenderShadowDetail 1 0 -RenderUseFBO 1 0 // // Ultra graphics (REALLY PURTY!) @@ -175,7 +171,6 @@ WLSkyDetail 1 128 RenderDeferred 1 1 RenderDeferredSSAO 1 1 RenderShadowDetail 1 2 -RenderUseFBO 1 0 // // Class Unknown Hardware (unknown) @@ -250,7 +245,6 @@ WindLightUseAtmosShaders 0 0 RenderDeferred 0 0 RenderDeferredSSAO 0 0 RenderShadowDetail 0 0 -RenderUseFBO 1 0 // diff --git a/indra/newview/featuretable_mac.txt b/indra/newview/featuretable_mac.txt index 23a757c0ee..8a76b1cf34 100644 --- a/indra/newview/featuretable_mac.txt +++ b/indra/newview/featuretable_mac.txt @@ -61,7 +61,6 @@ Disregard128DefaultDrawDistance 1 1 Disregard96DefaultDrawDistance 1 1 SkyUseClassicClouds 1 1 WatchdogDisabled 1 1 -RenderUseFBO 1 1 // // Low Graphics Settings @@ -90,7 +89,6 @@ VertexShaderEnable 1 0 WindLightUseAtmosShaders 1 0 WLSkyDetail 1 48 SkyUseClassicClouds 1 0 -RenderUseFBO 1 0 // // Mid Graphics Settings @@ -117,7 +115,6 @@ RenderWaterReflections 1 0 VertexShaderEnable 1 1 WindLightUseAtmosShaders 1 0 WLSkyDetail 1 48 -RenderUseFBO 1 0 // // High Graphics Settings (purty) @@ -144,7 +141,6 @@ RenderWaterReflections 1 0 VertexShaderEnable 1 1 WindLightUseAtmosShaders 1 1 WLSkyDetail 1 48 -RenderUseFBO 1 0 // // Ultra graphics (REALLY PURTY!) @@ -171,7 +167,6 @@ RenderWaterReflections 1 1 VertexShaderEnable 1 1 WindLightUseAtmosShaders 1 1 WLSkyDetail 1 128 -RenderUseFBO 1 0 // // Class Unknown Hardware (unknown) @@ -237,7 +232,6 @@ RenderUseImpostors 0 0 RenderVBOEnable 1 0 RenderWaterReflections 0 0 WindLightUseAtmosShaders 0 0 -RenderUseFBO 1 0 // // CPU based feature masks @@ -382,7 +376,6 @@ list ATI_Radeon_X1500 Disregard128DefaultDrawDistance 1 0 list ATI_Radeon_X1600 Disregard128DefaultDrawDistance 1 0 -RenderUseFBO 0 0 list ATI_Radeon_X1700 Disregard128DefaultDrawDistance 1 0 list ATI_Mobility_Radeon_X1xxx diff --git a/indra/newview/featuretable_xp.txt b/indra/newview/featuretable_xp.txt index 107d995d19..527a194fdf 100644 --- a/indra/newview/featuretable_xp.txt +++ b/indra/newview/featuretable_xp.txt @@ -60,7 +60,6 @@ SkyUseClassicClouds 1 1 RenderDeferred 1 0 RenderDeferredSSAO 1 0 RenderShadowDetail 1 0 -RenderUseFBO 1 1 WatchdogDisabled 1 1 RenderUseStreamVBO 1 1 @@ -92,7 +91,6 @@ SkyUseClassicClouds 1 0 RenderDeferred 1 0 RenderDeferredSSAO 1 0 RenderShadowDetail 1 0 -RenderUseFBO 1 0 // // Mid Graphics Settings @@ -120,7 +118,6 @@ WLSkyDetail 1 48 RenderDeferred 1 0 RenderDeferredSSAO 1 0 RenderShadowDetail 1 0 -RenderUseFBO 1 0 // // High Graphics Settings (purty) @@ -148,7 +145,6 @@ WLSkyDetail 1 48 RenderDeferred 1 0 RenderDeferredSSAO 1 0 RenderShadowDetail 1 0 -RenderUseFBO 1 0 // // Ultra graphics (REALLY PURTY!) @@ -176,7 +172,6 @@ WLSkyDetail 1 128 RenderDeferred 1 0 RenderDeferredSSAO 1 0 RenderShadowDetail 1 0 -RenderUseFBO 1 0 // // Class Unknown Hardware (unknown) @@ -251,7 +246,6 @@ WindLightUseAtmosShaders 0 0 RenderDeferred 0 0 RenderDeferredSSAO 0 0 RenderShadowDetail 0 0 -RenderUseFBO 1 0 // // CPU based feature masks -- cgit v1.2.3 From 48b107ac97a3de61ba028c6058fc1c848309e60f Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 3 Dec 2010 02:37:14 -0600 Subject: Apparently the new standard is to NOT suffix ARB extension function pointers with ARB. --- indra/llrender/llgl.cpp | 80 +++++++++++------------ indra/llrender/llglheaders.h | 40 ++++++------ indra/llrender/llrendertarget.cpp | 134 +++++++++++++++++++------------------- indra/newview/llviewerwindow.cpp | 2 +- indra/newview/pipeline.cpp | 6 +- 5 files changed, 131 insertions(+), 131 deletions(-) (limited to 'indra') diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 97047b21b0..d802a3045d 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -155,26 +155,26 @@ PFNGLPOINTPARAMETERFARBPROC glPointParameterfARB = NULL; PFNGLPOINTPARAMETERFVARBPROC glPointParameterfvARB = NULL; // GL_ARB_framebuffer_object -PFNGLISRENDERBUFFERPROC glIsRenderbufferARB = NULL; -PFNGLBINDRENDERBUFFERPROC glBindRenderbufferARB = NULL; -PFNGLDELETERENDERBUFFERSPROC glDeleteRenderbuffersARB = NULL; -PFNGLGENRENDERBUFFERSPROC glGenRenderbuffersARB = NULL; -PFNGLRENDERBUFFERSTORAGEPROC glRenderbufferStorageARB = NULL; -PFNGLGETRENDERBUFFERPARAMETERIVPROC glGetRenderbufferParameterivARB = NULL; -PFNGLISFRAMEBUFFERPROC glIsFramebufferARB = NULL; -PFNGLBINDFRAMEBUFFERPROC glBindFramebufferARB = NULL; -PFNGLDELETEFRAMEBUFFERSPROC glDeleteFramebuffersARB = NULL; -PFNGLGENFRAMEBUFFERSPROC glGenFramebuffersARB = NULL; -PFNGLCHECKFRAMEBUFFERSTATUSPROC glCheckFramebufferStatusARB = NULL; -PFNGLFRAMEBUFFERTEXTURE1DPROC glFramebufferTexture1DARB = NULL; -PFNGLFRAMEBUFFERTEXTURE2DPROC glFramebufferTexture2DARB = NULL; -PFNGLFRAMEBUFFERTEXTURE3DPROC glFramebufferTexture3DARB = NULL; -PFNGLFRAMEBUFFERRENDERBUFFERPROC glFramebufferRenderbufferARB = NULL; -PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC glGetFramebufferAttachmentParameterivARB = NULL; -PFNGLGENERATEMIPMAPPROC glGenerateMipmapARB = NULL; -PFNGLBLITFRAMEBUFFERPROC glBlitFramebufferARB = NULL; -PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC glRenderbufferStorageMultisampleARB = NULL; -PFNGLFRAMEBUFFERTEXTURELAYERPROC glFramebufferTextureLayerARB = NULL; +PFNGLISRENDERBUFFERPROC glIsRenderbuffer = NULL; +PFNGLBINDRENDERBUFFERPROC glBindRenderbuffer = NULL; +PFNGLDELETERENDERBUFFERSPROC glDeleteRenderbuffers = NULL; +PFNGLGENRENDERBUFFERSPROC glGenRenderbuffers = NULL; +PFNGLRENDERBUFFERSTORAGEPROC glRenderbufferStorage = NULL; +PFNGLGETRENDERBUFFERPARAMETERIVPROC glGetRenderbufferParameteriv = NULL; +PFNGLISFRAMEBUFFERPROC glIsFramebuffer = NULL; +PFNGLBINDFRAMEBUFFERPROC glBindFramebuffer = NULL; +PFNGLDELETEFRAMEBUFFERSPROC glDeleteFramebuffers = NULL; +PFNGLGENFRAMEBUFFERSPROC glGenFramebuffers = NULL; +PFNGLCHECKFRAMEBUFFERSTATUSPROC glCheckFramebufferStatus = NULL; +PFNGLFRAMEBUFFERTEXTURE1DPROC glFramebufferTexture1D = NULL; +PFNGLFRAMEBUFFERTEXTURE2DPROC glFramebufferTexture2D = NULL; +PFNGLFRAMEBUFFERTEXTURE3DPROC glFramebufferTexture3D = NULL; +PFNGLFRAMEBUFFERRENDERBUFFERPROC glFramebufferRenderbuffer = NULL; +PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC glGetFramebufferAttachmentParameteriv = NULL; +PFNGLGENERATEMIPMAPPROC glGenerateMipmap = NULL; +PFNGLBLITFRAMEBUFFERPROC glBlitFramebuffer = NULL; +PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC glRenderbufferStorageMultisample = NULL; +PFNGLFRAMEBUFFERTEXTURELAYERPROC glFramebufferTextureLayer = NULL; // GL_EXT_blend_func_separate PFNGLBLENDFUNCSEPARATEEXTPROC glBlendFuncSeparateEXT = NULL; @@ -849,26 +849,26 @@ void LLGLManager::initExtensions() if (mHasFramebufferObject) { llinfos << "initExtensions() FramebufferObject-related procs..." << llendl; - glIsRenderbufferARB = (PFNGLISRENDERBUFFERPROC) GLH_EXT_GET_PROC_ADDRESS("glIsRenderbufferARB"); - glBindRenderbufferARB = (PFNGLBINDRENDERBUFFERPROC) GLH_EXT_GET_PROC_ADDRESS("glBindRenderbufferARB"); - glDeleteRenderbuffersARB = (PFNGLDELETERENDERBUFFERSPROC) GLH_EXT_GET_PROC_ADDRESS("glDeleteRenderbuffersARB"); - glGenRenderbuffersARB = (PFNGLGENRENDERBUFFERSPROC) GLH_EXT_GET_PROC_ADDRESS("glGenRenderbuffersARB"); - glRenderbufferStorageARB = (PFNGLRENDERBUFFERSTORAGEPROC) GLH_EXT_GET_PROC_ADDRESS("glRenderbufferStorageARB"); - glGetRenderbufferParameterivARB = (PFNGLGETRENDERBUFFERPARAMETERIVPROC) GLH_EXT_GET_PROC_ADDRESS("glGetRenderbufferParameterivARB"); - glIsFramebufferARB = (PFNGLISFRAMEBUFFERPROC) GLH_EXT_GET_PROC_ADDRESS("glIsFramebufferARB"); - glBindFramebufferARB = (PFNGLBINDFRAMEBUFFERPROC) GLH_EXT_GET_PROC_ADDRESS("glBindFramebufferARB"); - glDeleteFramebuffersARB = (PFNGLDELETEFRAMEBUFFERSPROC) GLH_EXT_GET_PROC_ADDRESS("glDeleteFramebuffersARB"); - glGenFramebuffersARB = (PFNGLGENFRAMEBUFFERSPROC) GLH_EXT_GET_PROC_ADDRESS("glGenFramebuffersARB"); - glCheckFramebufferStatusARB = (PFNGLCHECKFRAMEBUFFERSTATUSPROC) GLH_EXT_GET_PROC_ADDRESS("glCheckFramebufferStatusARB"); - glFramebufferTexture1DARB = (PFNGLFRAMEBUFFERTEXTURE1DPROC) GLH_EXT_GET_PROC_ADDRESS("glFramebufferTexture1DARB"); - glFramebufferTexture2DARB = (PFNGLFRAMEBUFFERTEXTURE2DPROC) GLH_EXT_GET_PROC_ADDRESS("glFramebufferTexture2DARB"); - glFramebufferTexture3DARB = (PFNGLFRAMEBUFFERTEXTURE3DPROC) GLH_EXT_GET_PROC_ADDRESS("glFramebufferTexture3DARB"); - glFramebufferRenderbufferARB = (PFNGLFRAMEBUFFERRENDERBUFFERPROC) GLH_EXT_GET_PROC_ADDRESS("glFramebufferRenderbufferARB"); - glGetFramebufferAttachmentParameterivARB = (PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) GLH_EXT_GET_PROC_ADDRESS("glGetFramebufferAttachmentParameterivARB"); - glGenerateMipmapARB = (PFNGLGENERATEMIPMAPPROC) GLH_EXT_GET_PROC_ADDRESS("glGenerateMipmapARB"); - glBlitFramebufferARB = (PFNGLBLITFRAMEBUFFERPROC) GLH_EXT_GET_PROC_ADDRESS("glBlitFramebufferARB"); - glRenderbufferStorageMultisampleARB = (PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) GLH_EXT_GET_PROC_ADDRESS("glRenderbufferStorageMultisampleARB"); - glFramebufferTextureLayerARB = (PFNGLFRAMEBUFFERTEXTURELAYERPROC) GLH_EXT_GET_PROC_ADDRESS("glFramebufferTextureLayerARB"); + glIsRenderbuffer = (PFNGLISRENDERBUFFERPROC) GLH_EXT_GET_PROC_ADDRESS("glIsRenderbuffer"); + glBindRenderbuffer = (PFNGLBINDRENDERBUFFERPROC) GLH_EXT_GET_PROC_ADDRESS("glBindRenderbuffer"); + glDeleteRenderbuffers = (PFNGLDELETERENDERBUFFERSPROC) GLH_EXT_GET_PROC_ADDRESS("glDeleteRenderbuffers"); + glGenRenderbuffers = (PFNGLGENRENDERBUFFERSPROC) GLH_EXT_GET_PROC_ADDRESS("glGenRenderbuffers"); + glRenderbufferStorage = (PFNGLRENDERBUFFERSTORAGEPROC) GLH_EXT_GET_PROC_ADDRESS("glRenderbufferStorage"); + glGetRenderbufferParameteriv = (PFNGLGETRENDERBUFFERPARAMETERIVPROC) GLH_EXT_GET_PROC_ADDRESS("glGetRenderbufferParameteriv"); + glIsFramebuffer = (PFNGLISFRAMEBUFFERPROC) GLH_EXT_GET_PROC_ADDRESS("glIsFramebuffer"); + glBindFramebuffer = (PFNGLBINDFRAMEBUFFERPROC) GLH_EXT_GET_PROC_ADDRESS("glBindFramebuffer"); + glDeleteFramebuffers = (PFNGLDELETEFRAMEBUFFERSPROC) GLH_EXT_GET_PROC_ADDRESS("glDeleteFramebuffers"); + glGenFramebuffers = (PFNGLGENFRAMEBUFFERSPROC) GLH_EXT_GET_PROC_ADDRESS("glGenFramebuffers"); + glCheckFramebufferStatus = (PFNGLCHECKFRAMEBUFFERSTATUSPROC) GLH_EXT_GET_PROC_ADDRESS("glCheckFramebufferStatus"); + glFramebufferTexture1D = (PFNGLFRAMEBUFFERTEXTURE1DPROC) GLH_EXT_GET_PROC_ADDRESS("glFramebufferTexture1D"); + glFramebufferTexture2D = (PFNGLFRAMEBUFFERTEXTURE2DPROC) GLH_EXT_GET_PROC_ADDRESS("glFramebufferTexture2D"); + glFramebufferTexture3D = (PFNGLFRAMEBUFFERTEXTURE3DPROC) GLH_EXT_GET_PROC_ADDRESS("glFramebufferTexture3D"); + glFramebufferRenderbuffer = (PFNGLFRAMEBUFFERRENDERBUFFERPROC) GLH_EXT_GET_PROC_ADDRESS("glFramebufferRenderbuffer"); + glGetFramebufferAttachmentParameteriv = (PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) GLH_EXT_GET_PROC_ADDRESS("glGetFramebufferAttachmentParameteriv"); + glGenerateMipmap = (PFNGLGENERATEMIPMAPPROC) GLH_EXT_GET_PROC_ADDRESS("glGenerateMipmap"); + glBlitFramebuffer = (PFNGLBLITFRAMEBUFFERPROC) GLH_EXT_GET_PROC_ADDRESS("glBlitFramebuffer"); + glRenderbufferStorageMultisample = (PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) GLH_EXT_GET_PROC_ADDRESS("glRenderbufferStorageMultisample"); + glFramebufferTextureLayer = (PFNGLFRAMEBUFFERTEXTURELAYERPROC) GLH_EXT_GET_PROC_ADDRESS("glFramebufferTextureLayer"); } if (mHasDrawBuffers) { diff --git a/indra/llrender/llglheaders.h b/indra/llrender/llglheaders.h index 93c2c7cea8..86a7d7d915 100644 --- a/indra/llrender/llglheaders.h +++ b/indra/llrender/llglheaders.h @@ -652,26 +652,26 @@ extern PFNGLGETATTRIBLOCATIONARBPROC glGetAttribLocationARB; extern PFNGLBLENDFUNCSEPARATEEXTPROC glBlendFuncSeparateEXT; //GL_ARB_framebuffer_object -extern PFNGLISRENDERBUFFERPROC glIsRenderbufferARB; -extern PFNGLBINDRENDERBUFFERPROC glBindRenderbufferARB; -extern PFNGLDELETERENDERBUFFERSPROC glDeleteRenderbuffersARB; -extern PFNGLGENRENDERBUFFERSPROC glGenRenderbuffersARB; -extern PFNGLRENDERBUFFERSTORAGEPROC glRenderbufferStorageARB; -extern PFNGLGETRENDERBUFFERPARAMETERIVPROC glGetRenderbufferParameterivARB; -extern PFNGLISFRAMEBUFFERPROC glIsFramebufferARB; -extern PFNGLBINDFRAMEBUFFERPROC glBindFramebufferARB; -extern PFNGLDELETEFRAMEBUFFERSPROC glDeleteFramebuffersARB; -extern PFNGLGENFRAMEBUFFERSPROC glGenFramebuffersARB; -extern PFNGLCHECKFRAMEBUFFERSTATUSPROC glCheckFramebufferStatusARB; -extern PFNGLFRAMEBUFFERTEXTURE1DPROC glFramebufferTexture1DARB; -extern PFNGLFRAMEBUFFERTEXTURE2DPROC glFramebufferTexture2DARB; -extern PFNGLFRAMEBUFFERTEXTURE3DPROC glFramebufferTexture3DARB; -extern PFNGLFRAMEBUFFERRENDERBUFFERPROC glFramebufferRenderbufferARB; -extern PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC glGetFramebufferAttachmentParameterivARB; -extern PFNGLGENERATEMIPMAPPROC glGenerateMipmapARB; -extern PFNGLBLITFRAMEBUFFERPROC glBlitFramebufferARB; -extern PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC glRenderbufferStorageMultisampleARB; -extern PFNGLFRAMEBUFFERTEXTURELAYERPROC glFramebufferTextureLayerARB; +extern PFNGLISRENDERBUFFERPROC glIsRenderbuffer; +extern PFNGLBINDRENDERBUFFERPROC glBindRenderbuffer; +extern PFNGLDELETERENDERBUFFERSPROC glDeleteRenderbuffers; +extern PFNGLGENRENDERBUFFERSPROC glGenRenderbuffers; +extern PFNGLRENDERBUFFERSTORAGEPROC glRenderbufferStorage; +extern PFNGLGETRENDERBUFFERPARAMETERIVPROC glGetRenderbufferParameteriv; +extern PFNGLISFRAMEBUFFERPROC glIsFramebuffer; +extern PFNGLBINDFRAMEBUFFERPROC glBindFramebuffer; +extern PFNGLDELETEFRAMEBUFFERSPROC glDeleteFramebuffers; +extern PFNGLGENFRAMEBUFFERSPROC glGenFramebuffers; +extern PFNGLCHECKFRAMEBUFFERSTATUSPROC glCheckFramebufferStatus; +extern PFNGLFRAMEBUFFERTEXTURE1DPROC glFramebufferTexture1D; +extern PFNGLFRAMEBUFFERTEXTURE2DPROC glFramebufferTexture2D; +extern PFNGLFRAMEBUFFERTEXTURE3DPROC glFramebufferTexture3D; +extern PFNGLFRAMEBUFFERRENDERBUFFERPROC glFramebufferRenderbuffer; +extern PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC glGetFramebufferAttachmentParameteriv; +extern PFNGLGENERATEMIPMAPPROC glGenerateMipmap; +extern PFNGLBLITFRAMEBUFFERPROC glBlitFramebuffer; +extern PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC glRenderbufferStorageMultisample; +extern PFNGLFRAMEBUFFERTEXTURELAYERPROC glFramebufferTextureLayer; //GL_ARB_draw_buffers extern PFNGLDRAWBUFFERSARBPROC glDrawBuffersARB; diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp index 541a144fac..cd2556d435 100644 --- a/indra/llrender/llrendertarget.cpp +++ b/indra/llrender/llrendertarget.cpp @@ -38,7 +38,7 @@ void check_framebuffer_status() { if (gDebugGL) { - GLenum status = glCheckFramebufferStatusARB(GL_DRAW_FRAMEBUFFER); + GLenum status = glCheckFramebufferStatus(GL_DRAW_FRAMEBUFFER); switch (status) { case GL_FRAMEBUFFER_COMPLETE: @@ -99,24 +99,24 @@ void LLRenderTarget::allocate(U32 resx, U32 resy, U32 color_fmt, bool depth, boo stop_glerror(); } - glGenFramebuffersARB(1, (GLuint *) &mFBO); + glGenFramebuffers(1, (GLuint *) &mFBO); if (mDepth) { - glBindFramebufferARB(GL_FRAMEBUFFER, mFBO); + glBindFramebuffer(GL_FRAMEBUFFER, mFBO); if (mStencil) { - glFramebufferRenderbufferARB(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, mDepth); + glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, mDepth); stop_glerror(); - glFramebufferRenderbufferARB(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, mDepth); + glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, mDepth); stop_glerror(); } else { - glFramebufferTexture2DARB(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, LLTexUnit::getInternalType(mUsage), mDepth, 0); + glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, LLTexUnit::getInternalType(mUsage), mDepth, 0); stop_glerror(); } - glBindFramebufferARB(GL_FRAMEBUFFER, 0); + glBindFramebuffer(GL_FRAMEBUFFER, 0); } stop_glerror(); @@ -168,14 +168,14 @@ void LLRenderTarget::addColorAttachment(U32 color_fmt) } if (mFBO) { - glBindFramebufferARB(GL_FRAMEBUFFER, mFBO); - glFramebufferTexture2DARB(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0+offset, + glBindFramebuffer(GL_FRAMEBUFFER, mFBO); + glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0+offset, LLTexUnit::getInternalType(mUsage), tex, 0); stop_glerror(); check_framebuffer_status(); - glBindFramebufferARB(GL_FRAMEBUFFER, 0); + glBindFramebuffer(GL_FRAMEBUFFER, 0); } mTex.push_back(tex); @@ -187,10 +187,10 @@ void LLRenderTarget::allocateDepth() if (mStencil) { //use render buffers where stencil buffers are in play - glGenRenderbuffersARB(1, (GLuint *) &mDepth); - glBindRenderbufferARB(GL_RENDERBUFFER, mDepth); - glRenderbufferStorageARB(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8, mResX, mResY); - glBindRenderbufferARB(GL_RENDERBUFFER, 0); + glGenRenderbuffers(1, (GLuint *) &mDepth); + glBindRenderbuffer(GL_RENDERBUFFER, mDepth); + glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8, mResX, mResY); + glBindRenderbuffer(GL_RENDERBUFFER, 0); } else { @@ -222,23 +222,23 @@ void LLRenderTarget::shareDepthBuffer(LLRenderTarget& target) if (mDepth) { stop_glerror(); - glBindFramebufferARB(GL_FRAMEBUFFER, target.mFBO); + glBindFramebuffer(GL_FRAMEBUFFER, target.mFBO); stop_glerror(); if (mStencil) { - glFramebufferRenderbufferARB(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, mDepth); + glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, mDepth); stop_glerror(); - glFramebufferRenderbufferARB(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, mDepth); + glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, mDepth); stop_glerror(); target.mStencil = true; } else { - glFramebufferTexture2DARB(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, LLTexUnit::getInternalType(mUsage), mDepth, 0); + glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, LLTexUnit::getInternalType(mUsage), mDepth, 0); stop_glerror(); } - glBindFramebufferARB(GL_FRAMEBUFFER, 0); + glBindFramebuffer(GL_FRAMEBUFFER, 0); target.mUseDepth = true; } @@ -250,7 +250,7 @@ void LLRenderTarget::release() { if (mStencil) { - glDeleteRenderbuffersARB(1, (GLuint*) &mDepth); + glDeleteRenderbuffers(1, (GLuint*) &mDepth); stop_glerror(); } else @@ -262,23 +262,23 @@ void LLRenderTarget::release() } else if (mUseDepth && mFBO) { //detach shared depth buffer - glBindFramebufferARB(GL_FRAMEBUFFER, mFBO); + glBindFramebuffer(GL_FRAMEBUFFER, mFBO); if (mStencil) { //attached as a renderbuffer - glFramebufferRenderbufferARB(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, 0); - glFramebufferRenderbufferARB(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, 0); + glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, 0); + glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, 0); mStencil = false; } else { //attached as a texture - glFramebufferTexture2DARB(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, LLTexUnit::getInternalType(mUsage), 0, 0); + glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, LLTexUnit::getInternalType(mUsage), 0, 0); } mUseDepth = false; } if (mFBO) { - glDeleteFramebuffersARB(1, (GLuint *) &mFBO); + glDeleteFramebuffers(1, (GLuint *) &mFBO); mFBO = 0; } @@ -304,7 +304,7 @@ void LLRenderTarget::bindTarget() } else { - glBindFramebufferARB(GL_FRAMEBUFFER, mFBO); + glBindFramebuffer(GL_FRAMEBUFFER, mFBO); stop_glerror(); if (gGLManager.mHasDrawBuffers) { //setup multiple render targets @@ -336,7 +336,7 @@ void LLRenderTarget::unbindTarget() { if (gGLManager.mHasFramebufferObject) { - glBindFramebufferARB(GL_FRAMEBUFFER, 0); + glBindFramebuffer(GL_FRAMEBUFFER, 0); } sBoundTarget = NULL; } @@ -407,7 +407,7 @@ void LLRenderTarget::flush(bool fetch_depth) { stop_glerror(); - glBindFramebufferARB(GL_FRAMEBUFFER, 0); + glBindFramebuffer(GL_FRAMEBUFFER, 0); stop_glerror(); @@ -415,41 +415,41 @@ void LLRenderTarget::flush(bool fetch_depth) { LLGLEnable multisample(GL_MULTISAMPLE); stop_glerror(); - glBindFramebufferARB(GL_FRAMEBUFFER, mFBO); + glBindFramebuffer(GL_FRAMEBUFFER, mFBO); stop_glerror(); check_framebuffer_status(); - glBindFramebufferARB(GL_READ_FRAMEBUFFER, mSampleBuffer->mFBO); + glBindFramebuffer(GL_READ_FRAMEBUFFER, mSampleBuffer->mFBO); check_framebuffer_status(); stop_glerror(); - glBlitFramebufferARB(0, 0, mResX, mResY, 0, 0, mResX, mResY, GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT, GL_NEAREST); + glBlitFramebuffer(0, 0, mResX, mResY, 0, 0, mResX, mResY, GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT, GL_NEAREST); stop_glerror(); if (mTex.size() > 1) { for (U32 i = 1; i < mTex.size(); ++i) { - glFramebufferTexture2DARB(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, + glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, LLTexUnit::getInternalType(mUsage), mTex[i], 0); stop_glerror(); - glFramebufferRenderbufferARB(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, mSampleBuffer->mTex[i]); + glFramebufferRenderbuffer(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, mSampleBuffer->mTex[i]); stop_glerror(); - glBlitFramebufferARB(0, 0, mResX, mResY, 0, 0, mResX, mResY, GL_COLOR_BUFFER_BIT, GL_NEAREST); + glBlitFramebuffer(0, 0, mResX, mResY, 0, 0, mResX, mResY, GL_COLOR_BUFFER_BIT, GL_NEAREST); stop_glerror(); } for (U32 i = 0; i < mTex.size(); ++i) { - glFramebufferTexture2DARB(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0+i, + glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0+i, LLTexUnit::getInternalType(mUsage), mTex[i], 0); stop_glerror(); - glFramebufferRenderbufferARB(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0+i, GL_RENDERBUFFER, mSampleBuffer->mTex[i]); + glFramebufferRenderbuffer(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0+i, GL_RENDERBUFFER, mSampleBuffer->mTex[i]); stop_glerror(); } } } - glBindFramebufferARB(GL_FRAMEBUFFER, 0); + glBindFramebuffer(GL_FRAMEBUFFER, 0); } } @@ -476,25 +476,25 @@ void LLRenderTarget::copyContents(LLRenderTarget& source, S32 srcX0, S32 srcY0, { stop_glerror(); - glBindFramebufferARB(GL_FRAMEBUFFER, source.mFBO); + glBindFramebuffer(GL_FRAMEBUFFER, source.mFBO); gGL.getTexUnit(0)->bind(this, true); stop_glerror(); glCopyTexSubImage2D(LLTexUnit::getInternalType(mUsage), 0, srcX0, srcY0, dstX0, dstY0, dstX1, dstY1); stop_glerror(); - glBindFramebufferARB(GL_FRAMEBUFFER, 0); + glBindFramebuffer(GL_FRAMEBUFFER, 0); stop_glerror(); } else { - glBindFramebufferARB(GL_READ_FRAMEBUFFER, source.mFBO); + glBindFramebuffer(GL_READ_FRAMEBUFFER, source.mFBO); stop_glerror(); - glBindFramebufferARB(GL_DRAW_FRAMEBUFFER, mFBO); + glBindFramebuffer(GL_DRAW_FRAMEBUFFER, mFBO); stop_glerror(); check_framebuffer_status(); stop_glerror(); - glBlitFramebufferARB(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); + glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); stop_glerror(); - glBindFramebufferARB(GL_FRAMEBUFFER, 0); + glBindFramebuffer(GL_FRAMEBUFFER, 0); stop_glerror(); } } @@ -513,15 +513,15 @@ void LLRenderTarget::copyContentsToFramebuffer(LLRenderTarget& source, S32 srcX0 LLGLDepthTest depth(write_depth, write_depth); - glBindFramebufferARB(GL_READ_FRAMEBUFFER, source.mFBO); + glBindFramebuffer(GL_READ_FRAMEBUFFER, source.mFBO); stop_glerror(); - glBindFramebufferARB(GL_DRAW_FRAMEBUFFER, 0); + glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0); stop_glerror(); check_framebuffer_status(); stop_glerror(); - glBlitFramebufferARB(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); + glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); stop_glerror(); - glBindFramebufferARB(GL_FRAMEBUFFER, 0); + glBindFramebuffer(GL_FRAMEBUFFER, 0); stop_glerror(); } } @@ -556,19 +556,19 @@ void LLMultisampleBuffer::release() { if (mFBO) { - glDeleteFramebuffersARB(1, (GLuint *) &mFBO); + glDeleteFramebuffers(1, (GLuint *) &mFBO); mFBO = 0; } if (mTex.size() > 0) { - glDeleteRenderbuffersARB(mTex.size(), (GLuint *) &mTex[0]); + glDeleteRenderbuffers(mTex.size(), (GLuint *) &mTex[0]); mTex.clear(); } if (mDepth) { - glDeleteRenderbuffersARB(1, (GLuint *) &mDepth); + glDeleteRenderbuffers(1, (GLuint *) &mDepth); mDepth = 0; } } @@ -585,7 +585,7 @@ void LLMultisampleBuffer::bindTarget(LLRenderTarget* ref) ref = this; } - glBindFramebufferARB(GL_FRAMEBUFFER, mFBO); + glBindFramebuffer(GL_FRAMEBUFFER, mFBO); if (gGLManager.mHasDrawBuffers) { //setup multiple render targets GLenum drawbuffers[] = {GL_COLOR_ATTACHMENT0, @@ -638,21 +638,21 @@ void LLMultisampleBuffer::allocate(U32 resx, U32 resy, U32 color_fmt, bool depth stop_glerror(); } - glGenFramebuffersARB(1, (GLuint *) &mFBO); + glGenFramebuffers(1, (GLuint *) &mFBO); - glBindFramebufferARB(GL_FRAMEBUFFER, mFBO); + glBindFramebuffer(GL_FRAMEBUFFER, mFBO); if (mDepth) { - glFramebufferRenderbufferARB(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, mDepth); + glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, mDepth); if (mStencil) { - glFramebufferRenderbufferARB(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, mDepth); + glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, mDepth); } } stop_glerror(); - glBindFramebufferARB(GL_FRAMEBUFFER, 0); + glBindFramebuffer(GL_FRAMEBUFFER, 0); stop_glerror(); } @@ -674,18 +674,18 @@ void LLMultisampleBuffer::addColorAttachment(U32 color_fmt) } U32 tex; - glGenRenderbuffersARB(1, &tex); + glGenRenderbuffers(1, &tex); - glBindRenderbufferARB(GL_RENDERBUFFER, tex); - glRenderbufferStorageMultisampleARB(GL_RENDERBUFFER, mSamples, color_fmt, mResX, mResY); + glBindRenderbuffer(GL_RENDERBUFFER, tex); + glRenderbufferStorageMultisample(GL_RENDERBUFFER, mSamples, color_fmt, mResX, mResY); stop_glerror(); if (mFBO) { - glBindFramebufferARB(GL_FRAMEBUFFER, mFBO); - glFramebufferRenderbufferARB(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0+offset, GL_RENDERBUFFER, tex); + glBindFramebuffer(GL_FRAMEBUFFER, mFBO); + glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0+offset, GL_RENDERBUFFER, tex); stop_glerror(); - GLenum status = glCheckFramebufferStatusARB(GL_FRAMEBUFFER); + GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER); switch (status) { case GL_FRAMEBUFFER_COMPLETE: @@ -695,7 +695,7 @@ void LLMultisampleBuffer::addColorAttachment(U32 color_fmt) break; } - glBindFramebufferARB(GL_FRAMEBUFFER, 0); + glBindFramebuffer(GL_FRAMEBUFFER, 0); } mTex.push_back(tex); @@ -703,15 +703,15 @@ void LLMultisampleBuffer::addColorAttachment(U32 color_fmt) void LLMultisampleBuffer::allocateDepth() { - glGenRenderbuffersARB(1, (GLuint* ) &mDepth); - glBindRenderbufferARB(GL_RENDERBUFFER, mDepth); + glGenRenderbuffers(1, (GLuint* ) &mDepth); + glBindRenderbuffer(GL_RENDERBUFFER, mDepth); if (mStencil) { - glRenderbufferStorageMultisampleARB(GL_RENDERBUFFER, mSamples, GL_DEPTH24_STENCIL8, mResX, mResY); + glRenderbufferStorageMultisample(GL_RENDERBUFFER, mSamples, GL_DEPTH24_STENCIL8, mResX, mResY); } else { - glRenderbufferStorageMultisampleARB(GL_RENDERBUFFER, mSamples, GL_DEPTH_COMPONENT16, mResX, mResY); + glRenderbufferStorageMultisample(GL_RENDERBUFFER, mSamples, GL_DEPTH_COMPONENT16, mResX, mResY); } } diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index ee1759beae..12602169c0 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -4188,7 +4188,7 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei { mWindowRectRaw = window_rect; target.flush(); - glBindFramebufferARB(GL_FRAMEBUFFER, 0); + glBindFramebuffer(GL_FRAMEBUFFER, 0); } gDisplaySwapBuffers = FALSE; gDepthDirty = TRUE; diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 31200675fc..1c91c528f7 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -5857,7 +5857,7 @@ void apply_cube_face_rotation(U32 face) void validate_framebuffer_object() { GLenum status; - status = glCheckFramebufferStatusARB(GL_FRAMEBUFFER_EXT); + status = glCheckFramebufferStatus(GL_FRAMEBUFFER_EXT); switch(status) { case GL_FRAMEBUFFER_COMPLETE: @@ -6109,7 +6109,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) if (LLRenderTarget::sUseFBO) { LLFastTimer ftm(FTM_RENDER_BLOOM_FBO); - glBindFramebufferARB(GL_FRAMEBUFFER, 0); + glBindFramebuffer(GL_FRAMEBUFFER, 0); } gGLViewport[0] = gViewerWindow->getWorldViewRectRaw().mLeft; @@ -6860,7 +6860,7 @@ void LLPipeline::renderDeferredLighting() mLuminanceMap.flush(); gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mLuminanceMap.getTexture(), true); gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_TRILINEAR); - glGenerateMipmapARB(GL_TEXTURE_2D); + glGenerateMipmap(GL_TEXTURE_2D); } } -- cgit v1.2.3 From 27b2ec552dacde58d737f40767064a396be89ac7 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 3 Dec 2010 02:38:57 -0600 Subject: Switch default platform SDK to 10.6 --- indra/cmake/Variables.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index bc517cde49..c543710d6c 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -88,7 +88,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") if (NOT CMAKE_OSX_DEPLOYMENT_TARGET) # NOTE: setting -isysroot is NOT adequate: http://lists.apple.com/archives/Xcode-users/2007/Oct/msg00696.html # see http://public.kitware.com/Bug/view.php?id=9959 + poppy - set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.5.sdk) + set(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX10.6.sdk) set(CMAKE_OSX_DEPLOYMENT_TARGET 10.4) endif (NOT CMAKE_OSX_DEPLOYMENT_TARGET) -- cgit v1.2.3 From 5d7fe43f64e904d5873d6c2f6e53b90e82753c7b Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 3 Dec 2010 02:40:25 -0600 Subject: Add CameraCoCRatio to make DoF depending on screen resolution. --- indra/newview/app_settings/settings.xml | 14 +++++++++++++- indra/newview/pipeline.cpp | 3 ++- 2 files changed, 15 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index ef3803aed6..10799a6ed8 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -1380,7 +1380,19 @@ 0.05 - + CameraCoCRatio + + Comment + Ratio of circle of confusion to vertical resolution for DoF effect. + Persist + 1 + Type + F32 + Value + 54 + + + CertStore Comment diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 31200675fc..717c97c6d4 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -6161,8 +6161,9 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) subject_distance *= 1000.f; F32 fnumber = gSavedSettings.getF32("CameraFNumber"); F32 focal_length = gSavedSettings.getF32("CameraFocalLength"); - F32 coc = gSavedSettings.getF32("CameraCoC"); + F32 coc_ratio = gSavedSettings.getF32("CameraCoCRatio"); + F32 coc = coc_ratio/mScreen.getHeight(); F32 hyperfocal_distance = (focal_length*focal_length)/(fnumber*coc); -- cgit v1.2.3 From 15ee60e39176545b2b0f37639a531eea613ecfd0 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 3 Dec 2010 03:28:00 -0600 Subject: #ifdef out ll_align_malloc/free (gcc 4.2 is unhappy about some of the syntax there) --- indra/llcommon/llmemory.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'indra') diff --git a/indra/llcommon/llmemory.h b/indra/llcommon/llmemory.h index 985f5ca30f..8d114f744b 100644 --- a/indra/llcommon/llmemory.h +++ b/indra/llcommon/llmemory.h @@ -1,25 +1,25 @@ -/** +/** * @file llmemory.h * @brief Memory allocation/deallocation header-stuff goes here. * * $LicenseInfo:firstyear=2002&license=viewerlgpl$ * Second Life Viewer Source Code * Copyright (C) 2010, 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$ */ @@ -29,12 +29,13 @@ #include // A not necessarily efficient, but general, aligned malloc http://stackoverflow.com/questions/196329/osx-lacks-memalign +#if 0 //DON'T use ll_aligned_foo now that we use tcmalloc everywhere (tcmalloc aligns automatically at appropriate intervals) inline void* ll_aligned_malloc( size_t size, int align ) { void* mem = malloc( size + (align - 1) + sizeof(void*) ); char* aligned = ((char*)mem) + sizeof(void*); aligned += align - ((uintptr_t)aligned & (align - 1)); - + ((void**)aligned)[-1] = mem; return aligned; } @@ -95,6 +96,7 @@ inline void ll_aligned_free_32(void *p) free(p); // posix_memalign() is compatible with heap deallocator #endif } +#endif class LL_COMMON_API LLMemory { -- cgit v1.2.3 From 71f4d880082df829aff56898af138d3f3f2c962a Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 3 Dec 2010 03:28:15 -0600 Subject: Fix a complaint from gcc about inaccessible base. --- indra/newview/llnamelistctrl.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'indra') diff --git a/indra/newview/llnamelistctrl.h b/indra/newview/llnamelistctrl.h index 330510814a..d64fdbe6a5 100644 --- a/indra/newview/llnamelistctrl.h +++ b/indra/newview/llnamelistctrl.h @@ -1,25 +1,25 @@ -/** +/** * @file llnamelistctrl.h * @brief A list of names, automatically refreshing from the name cache. * * $LicenseInfo:firstyear=2003&license=viewerlgpl$ * Second Life Viewer Source Code * Copyright (C) 2010, 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$ */ @@ -34,7 +34,7 @@ class LLAvatarName; class LLNameListCtrl -: public LLScrollListCtrl, protected LLInstanceTracker +: public LLScrollListCtrl, public LLInstanceTracker { public: typedef enum e_name_type @@ -58,7 +58,7 @@ public: NameItem() : name("name"), target("target", INDIVIDUAL) - {} + {} }; struct NameColumn : public LLInitParam::Choice @@ -83,7 +83,7 @@ protected: LLNameListCtrl(const Params&); friend class LLUICtrlFactory; public: - // Add a user to the list by name. It will be added, the name + // Add a user to the list by name. It will be added, the name // requested from the cache, and updated as necessary. void addNameItem(const LLUUID& agent_id, EAddPosition pos = ADD_BOTTOM, BOOL enabled = TRUE, const std::string& suffix = LLStringUtil::null); @@ -92,7 +92,7 @@ public: /*virtual*/ LLScrollListItem* addElement(const LLSD& element, EAddPosition pos = ADD_BOTTOM, void* userdata = NULL); LLScrollListItem* addNameItemRow(const NameItem& value, EAddPosition pos = ADD_BOTTOM, const std::string& suffix = LLStringUtil::null); - // Add a user to the list by name. It will be added, the name + // Add a user to the list by name. It will be added, the name // requested from the cache, and updated as necessary. void addGroupNameItem(const LLUUID& group_id, EAddPosition pos = ADD_BOTTOM, BOOL enabled = TRUE); @@ -126,7 +126,7 @@ private: /** * LLNameListCtrl item - * + * * We don't use LLScrollListItem to be able to override getUUID(), which is needed * because the name list item value is not simply an UUID but a map (uuid, is_group). */ -- cgit v1.2.3 From ec9ba94b69e259347f71fbbcec2f0f8fe43a47a7 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 3 Dec 2010 03:52:57 -0600 Subject: DoF tweaks -- halo hiding, etc. --- .../shaders/class1/deferred/postDeferredF.glsl | 14 +++++++++----- indra/newview/pipeline.cpp | 5 ++--- 2 files changed, 11 insertions(+), 8 deletions(-) (limited to 'indra') diff --git a/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl b/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl index 77e3e41ea4..02712e0a5b 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/postDeferredF.glsl @@ -73,12 +73,14 @@ void main() { //pixel is behind far focal plane float w = 1.0; - float fd = far_focal_distance; + float fd = (depth[0]-far_focal_distance)*0.5+far_focal_distance; float sc = far_focal_distance - depth[0]; - sc /= -far_focal_distance; + sc /= near_focal_distance-far_focal_distance; + + sc = sqrt(sc); sc = min(sc, 8.0); - + while (sc > 1.0) { dofSample(diff,w, fd, sc,sc); @@ -104,8 +106,10 @@ void main() { //pixel is in front of near focal plane //diff.r = 1.0; float w = 1.0; - float sc = depth[0] - fd; - sc = min(-sc/fd*16.0, 8.0); + float sc = near_focal_distance-depth[0]; + sc /= near_focal_distance; + sc *= 8.0; + sc = min(sc, 8.0); fd = depth[0]; while (sc > 1.0) diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index fa156c85e3..f0446b024c 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -6174,8 +6174,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) //adjust focal length for zoom F32 fov = LLViewerCamera::getInstance()->getView(); - F32 default_fov = LLViewerCamera::getInstance()->getDefaultFOV(); - focal_length *= default_fov/fov; + focal_length *= 1.f/fov; F32 near_focal_distance = hyperfocal_distance*subject_distance/(hyperfocal_distance+subject_distance); @@ -6197,7 +6196,7 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) if (channel > -1) { mScreen.bindTexture(0, channel); - gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR); + gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_POINT); } gGL.begin(LLRender::TRIANGLE_STRIP); -- cgit v1.2.3 From 3daaf4597de3a0923355eaddd53627edcdd90472 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 3 Dec 2010 03:54:24 -0600 Subject: Add extern declarations of GL_ARB_framebuffer_object to glheades.h --- indra/llrender/llglheaders.h | 55 +++++++++++++++++++++----------------------- 1 file changed, 26 insertions(+), 29 deletions(-) (limited to 'indra') diff --git a/indra/llrender/llglheaders.h b/indra/llrender/llglheaders.h index 86a7d7d915..1f77897a56 100644 --- a/indra/llrender/llglheaders.h +++ b/indra/llrender/llglheaders.h @@ -1,25 +1,25 @@ -/** +/** * @file llglheaders.h * @brief LLGL definitions * * $LicenseInfo:firstyear=2001&license=viewerlgpl$ * Second Life Viewer Source Code * Copyright (C) 2010, 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$ */ @@ -449,30 +449,27 @@ extern PFNGLGETCOMPRESSEDTEXIMAGEARBPROC glGetCompressedTexImageARB; //GL_EXT_blend_func_separate extern PFNGLBLENDFUNCSEPARATEEXTPROC glBlendFuncSeparateEXT; -//GL_EXT_framebuffer_object -extern PFNGLISRENDERBUFFEREXTPROC glIsRenderbufferEXT; -extern PFNGLBINDRENDERBUFFEREXTPROC glBindRenderbufferEXT; -extern PFNGLDELETERENDERBUFFERSEXTPROC glDeleteRenderbuffersEXT; -extern PFNGLGENRENDERBUFFERSEXTPROC glGenRenderbuffersEXT; -extern PFNGLRENDERBUFFERSTORAGEEXTPROC glRenderbufferStorageEXT; -extern PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC glGetRenderbufferParameterivEXT; -extern PFNGLISFRAMEBUFFEREXTPROC glIsFramebufferEXT; -extern PFNGLBINDFRAMEBUFFEREXTPROC glBindFramebufferEXT; -extern PFNGLDELETEFRAMEBUFFERSEXTPROC glDeleteFramebuffersEXT; -extern PFNGLGENFRAMEBUFFERSEXTPROC glGenFramebuffersEXT; -extern PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC glCheckFramebufferStatusEXT; -extern PFNGLFRAMEBUFFERTEXTURE1DEXTPROC glFramebufferTexture1DEXT; -extern PFNGLFRAMEBUFFERTEXTURE2DEXTPROC glFramebufferTexture2DEXT; -extern PFNGLFRAMEBUFFERTEXTURE3DEXTPROC glFramebufferTexture3DEXT; -extern PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC glFramebufferRenderbufferEXT; -extern PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC glGetFramebufferAttachmentParameterivEXT; -extern PFNGLGENERATEMIPMAPEXTPROC glGenerateMipmapEXT; - -// GL_EXT_framebuffer_multisample -extern PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC glRenderbufferStorageMultisampleEXT; - -// GL_EXT_framebuffer_blit -extern PFNGLBLITFRAMEBUFFEREXTPROC glBlitFramebufferEXT; +//GL_ARB_framebuffer_object +extern PFNGLISRENDERBUFFERPROC glIsRenderbuffer; +extern PFNGLBINDRENDERBUFFERPROC glBindRenderbuffer; +extern PFNGLDELETERENDERBUFFERSPROC glDeleteRenderbuffers; +extern PFNGLGENRENDERBUFFERSPROC glGenRenderbuffers; +extern PFNGLRENDERBUFFERSTORAGEPROC glRenderbufferStorage; +extern PFNGLGETRENDERBUFFERPARAMETERIVPROC glGetRenderbufferParameteriv; +extern PFNGLISFRAMEBUFFERPROC glIsFramebuffer; +extern PFNGLBINDFRAMEBUFFERPROC glBindFramebuffer; +extern PFNGLDELETEFRAMEBUFFERSPROC glDeleteFramebuffers; +extern PFNGLGENFRAMEBUFFERSPROC glGenFramebuffers; +extern PFNGLCHECKFRAMEBUFFERSTATUSPROC glCheckFramebufferStatus; +extern PFNGLFRAMEBUFFERTEXTURE1DPROC glFramebufferTexture1D; +extern PFNGLFRAMEBUFFERTEXTURE2DPROC glFramebufferTexture2D; +extern PFNGLFRAMEBUFFERTEXTURE3DPROC glFramebufferTexture3D; +extern PFNGLFRAMEBUFFERRENDERBUFFERPROC glFramebufferRenderbuffer; +extern PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC glGetFramebufferAttachmentParameteriv; +extern PFNGLGENERATEMIPMAPPROC glGenerateMipmap; +extern PFNGLBLITFRAMEBUFFERPROC glBlitFramebuffer; +extern PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC glRenderbufferStorageMultisample; +extern PFNGLFRAMEBUFFERTEXTURELAYERPROC glFramebufferTextureLayer; //GL_ARB_draw_buffers extern PFNGLDRAWBUFFERSARBPROC glDrawBuffersARB; -- cgit v1.2.3 From 4e922949a9a1e508a698ce5a03657f1417252d9f Mon Sep 17 00:00:00 2001 From: prep linden Date: Fri, 3 Dec 2010 13:02:34 -0500 Subject: Fix for SH-479 --- indra/llcharacter/lljoint.h | 3 +++ indra/newview/llvoavatar.cpp | 58 ++++++++++++++++++++-------------------- indra/newview/llvoavatarself.cpp | 6 ++--- indra/newview/llvovolume.cpp | 6 +++-- 4 files changed, 39 insertions(+), 34 deletions(-) (limited to 'indra') diff --git a/indra/llcharacter/lljoint.h b/indra/llcharacter/lljoint.h index 4c8bd690e8..cbfca588b0 100644 --- a/indra/llcharacter/lljoint.h +++ b/indra/llcharacter/lljoint.h @@ -83,6 +83,7 @@ protected: LLXformMatrix mOldXform; LLXformMatrix mDefaultXform; + LLUUID mId; public: U32 mDirtyFlags; BOOL mUpdateXform; @@ -182,6 +183,8 @@ public: void setDefaultFromCurrentXform( void ); void storeCurrentXform( const LLVector3& pos ); + LLUUID getId( void ) { return mId; } + void setId( const LLUUID& id ) { mId = id;} }; #endif // LL_LLJOINT_H diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 7e9a6f64f2..34345f2471 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -3447,14 +3447,14 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) LLVector3d ground_under_pelvis; if (isSelf()) - { - if ( !mHasPelvisOffset ) - { - gAgent.setPositionAgent(getRenderPosition()); - } - else - { - gAgent.setPositionAgent( getRenderPosition() + mPelvisOffset ); + { + if ( !mHasPelvisOffset ) + { + gAgent.setPositionAgent(getRenderPosition()); + } + else + { + gAgent.setPositionAgent( getRenderPosition() + mPelvisOffset ); } } @@ -3472,22 +3472,22 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent) mInAir = in_air; // correct for the fact that the pelvis is not necessarily the center - // of the agent's physical representation + // of the agent's physical representation root_pos.mdV[VZ] -= (0.5f * mBodySize.mV[VZ]) - mPelvisToFoot; LLVector3 newPosition = gAgent.getPosAgentFromGlobal(root_pos); if (newPosition != mRoot.getXform()->getWorldPosition()) { - if ( !mHasPelvisOffset ) - { - mRoot.touch(); - mRoot.setWorldPosition( newPosition ); // regular update - } - else - { - mRoot.touch(); - mRoot.setWorldPosition( newPosition + mPelvisOffset ); + if ( !mHasPelvisOffset ) + { + mRoot.touch(); + mRoot.setWorldPosition( newPosition ); // regular update + } + else + { + mRoot.touch(); + mRoot.setWorldPosition( newPosition + mPelvisOffset ); } } @@ -3792,21 +3792,21 @@ void LLVOAvatar::updateHeadOffset() //------------------------------------------------------------------------ // setPelvisOffset //------------------------------------------------------------------------ -void LLVOAvatar::setPelvisOffset( bool hasOffset, const LLVector3& offsetAmount ) -{ - mHasPelvisOffset = hasOffset; - if ( mHasPelvisOffset ) - { - mPelvisOffset = offsetAmount; - } -} +void LLVOAvatar::setPelvisOffset( bool hasOffset, const LLVector3& offsetAmount ) +{ + mHasPelvisOffset = hasOffset; + if ( mHasPelvisOffset ) + { + mPelvisOffset = offsetAmount; + } +} //------------------------------------------------------------------------ // postPelvisSetRecalc //------------------------------------------------------------------------ void LLVOAvatar::postPelvisSetRecalc( void ) { - computeBodySize(); - mRoot.updateWorldMatrixChildren(); + computeBodySize(); + mRoot.updateWorldMatrixChildren(); dirtyMesh(); updateHeadOffset(); } @@ -4975,7 +4975,7 @@ void LLVOAvatar::resetJointPositionsToDefault( void ) //restore joints to default positions, however skip over the pelvis if ( pJoint && pPelvis != pJoint ) { - pJoint->restoreToDefaultXform(); + pJoint->restoreOldXform(); } } //make sure we don't apply the joint offset diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index 6fa3da9b41..5054aa3c9e 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -650,10 +650,10 @@ LLJoint *LLVOAvatarSelf::getJoint(const std::string &name) } return LLVOAvatar::getJoint(name); } - +//virtual void LLVOAvatarSelf::resetJointPositions( void ) { - return LLVOAvatar::resetJointPositionsToDefault(); + return LLVOAvatar::resetJointPositions(); } // virtual BOOL LLVOAvatarSelf::setVisualParamWeight(LLVisualParam *which_param, F32 weight, BOOL upload_bake ) @@ -1161,7 +1161,7 @@ BOOL LLVOAvatarSelf::detachObject(LLViewerObject *viewer_object) const int bindCnt = pSkinData->mAlternateBindMatrix.size(); if ( bindCnt > 0 ) { - resetJointPositions(); + LLVOAvatar::resetJointPositionsToDefault(); } } } diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 39e286ac38..fa0f48fce6 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -4057,7 +4057,8 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) if ( pAvatarVO ) { - const LLMeshSkinInfo* pSkinData = gMeshRepo.getSkinInfo( vobj->getVolume()->getParams().getSculptID() ); + LLUUID currentId = vobj->getVolume()->getParams().getSculptID(); + const LLMeshSkinInfo* pSkinData = gMeshRepo.getSkinInfo( currentId ); if ( pSkinData ) { @@ -4069,8 +4070,9 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) { std::string lookingForJoint = pSkinData->mJointNames[i].c_str(); LLJoint* pJoint = pAvatarVO->getJoint( lookingForJoint ); - if ( pJoint ) + if ( pJoint && pJoint->getId() != currentId ) { + pJoint->setId( currentId ); const LLVector3& jointPos = pSkinData->mAlternateBindMatrix[i].getTranslation(); //If joint is a pelvis then handle by setting avPos+offset if ( lookingForJoint == "mPelvis" ) -- cgit v1.2.3 From 2f4a3197bfdb5200d4472343b729fe7ff7eb9225 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 3 Dec 2010 15:40:42 -0500 Subject: Added timer-related logging during logperformance --- indra/llcommon/llfasttimer_class.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) mode change 100644 => 100755 indra/llcommon/llfasttimer_class.cpp (limited to 'indra') diff --git a/indra/llcommon/llfasttimer_class.cpp b/indra/llcommon/llfasttimer_class.cpp old mode 100644 new mode 100755 index c084166ccc..0828635881 --- a/indra/llcommon/llfasttimer_class.cpp +++ b/indra/llcommon/llfasttimer_class.cpp @@ -501,6 +501,18 @@ void LLFastTimer::NamedTimer::resetFrame() if (sLog) { //output current frame counts to performance log + static S32 call_count = 0; + if (call_count % 100 == 0) + { + llinfos << "countsPerSecond (32 bit): " << countsPerSecond() << llendl; + llinfos << "get_clock_count (64 bit): " << get_clock_count() << llendl; + llinfos << "LLProcessorInfo().getCPUFrequency() " << LLProcessorInfo().getCPUFrequency() << llendl; + llinfos << "getCPUClockCount32() " << getCPUClockCount32() << llendl; + llinfos << "getCPUClockCount64() " << getCPUClockCount64() << llendl; + llinfos << "elapsed sec " << ((F64)getCPUClockCount64())/((F64)LLProcessorInfo().getCPUFrequency()*1000000.0) << llendl; + } + call_count++; + F64 iclock_freq = 1000.0 / countsPerSecond(); // good place to calculate clock frequency F64 total_time = 0; -- cgit v1.2.3 From 6cfb2c81a82693789da582492418efecf628e426 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 3 Dec 2010 15:30:00 -0600 Subject: Get rid of CameraCoC and adjust focal length and fnumber for every day use. --- indra/newview/app_settings/settings.xml | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'indra') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 10799a6ed8..4e5ad60513 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -1353,7 +1353,7 @@ Type F32 Value - 8.0 + 11.0 CameraFocalLength @@ -1365,19 +1365,7 @@ Type F32 Value - 50 - - - CameraCoC - - Comment - Camera circle of confusion for DoF effect (in millimeters) - Persist - 1 - Type - F32 - Value - 0.05 + 35 CameraCoCRatio -- cgit v1.2.3 From c29203f3f33184b05676db413f936eaff41eab74 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Fri, 3 Dec 2010 16:36:51 -0500 Subject: Fix for clobbered deferred rendering UI. Fix for compile errors from llappviewer.cpp merge. --- indra/newview/llappviewer.cpp | 2 +- .../skins/default/xui/en/panel_preferences_graphics1.xml | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) (limited to 'indra') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 03d3a3a180..29ffcdfbd1 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -909,7 +909,7 @@ bool LLAppViewer::init() gDebugInfo["GraphicsCard"] = LLFeatureManager::getInstance()->getGPUString(); // Save the current version to the prefs file - gSavedSettings.setString("LastRunVersion", LLVersionInfo::getVersionAndChannel()); + gSavedSettings.setString("LastRunVersion", LLVersionInfo::getChannelAndVersion()); gSimLastTime = gRenderStartTime.getElapsedTimeF32(); diff --git a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml index 6573822d1a..d5bec66be2 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml @@ -192,9 +192,19 @@ layout="topleft" left_delta="0" name="BumpShiny" + width="256" /> + - + - + Date: Fri, 3 Dec 2010 16:52:23 -0500 Subject: Fix for overlapping UI elements in panel_preferences_graphics1 due to bad merge. --- indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml | 1 + 1 file changed, 1 insertion(+) (limited to 'indra') diff --git a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml index d5bec66be2..70db3c6592 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml @@ -192,6 +192,7 @@ layout="topleft" left_delta="0" name="BumpShiny" + top_pad="1" width="256" /> Date: Fri, 3 Dec 2010 17:36:17 -0500 Subject: updated message template md5sum --- indra/cmake/TemplateCheck.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 indra/cmake/TemplateCheck.cmake (limited to 'indra') diff --git a/indra/cmake/TemplateCheck.cmake b/indra/cmake/TemplateCheck.cmake old mode 100644 new mode 100755 index 90d58d93ad..c43e235f20 --- a/indra/cmake/TemplateCheck.cmake +++ b/indra/cmake/TemplateCheck.cmake @@ -8,7 +8,7 @@ macro (check_message_template _target) POST_BUILD COMMAND ${PYTHON_EXECUTABLE} ARGS ${SCRIPTS_DIR}/md5check.py - 3f19d130400c547de36278a6b6f9b028 + 0441fea513458ade4b81607acf481692 ${SCRIPTS_DIR}/messages/message_template.msg COMMENT "Verifying message template - See http://wiki.secondlife.com/wiki/Template_verifier.py" ) -- cgit v1.2.3