summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llrender/llgl.cpp2
-rw-r--r--indra/llrender/llrendertarget.cpp2
-rw-r--r--indra/llrender/llvertexbuffer.cpp14
-rwxr-xr-xindra/newview/llfloaterpreference.cpp13
-rw-r--r--indra/newview/llviewershadermgr.cpp6
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml14
6 files changed, 18 insertions, 33 deletions
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index 189a460001..245e8c7bef 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -686,7 +686,7 @@ bool LLGLManager::initGL()
#if LL_WINDOWS
if (mHasDebugOutput && gDebugGL)
{ //setup debug output callback
- glDebugMessageControlARB(GL_DONT_CARE, GL_DONT_CARE, GL_DEBUG_SEVERITY_LOW_ARB, 0, NULL, GL_TRUE);
+ //glDebugMessageControlARB(GL_DONT_CARE, GL_DONT_CARE, GL_DEBUG_SEVERITY_LOW_ARB, 0, NULL, GL_TRUE);
glDebugMessageCallbackARB((GLDEBUGPROCARB) gl_debug_callback, NULL);
glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB);
}
diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp
index 1a80688dfc..cd3a7f21e4 100644
--- a/indra/llrender/llrendertarget.cpp
+++ b/indra/llrender/llrendertarget.cpp
@@ -308,8 +308,8 @@ void LLRenderTarget::release()
glBindFramebuffer(GL_FRAMEBUFFER, mFBO);
if (mStencil)
{ //attached as a renderbuffer
- glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, 0);
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, 0);
+ glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, 0);
mStencil = false;
}
else
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index 71596d41d3..7f2337a224 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -574,6 +574,8 @@ void LLVertexBuffer::unbind()
glBindVertexArray(0);
#endif
sGLRenderArray = 0;
+ sGLRenderIndices = 0;
+ sIBOActive = FALSE;
}
if (sVBOActive)
@@ -1131,9 +1133,7 @@ void LLVertexBuffer::setupVertexArray()
}
}
-#if GL_ARB_vertex_array_object
- glBindVertexArray(0);
-#endif
+ unbind();
}
void LLVertexBuffer::resizeBuffer(S32 newnverts, S32 newnindices)
@@ -1873,6 +1873,12 @@ bool LLVertexBuffer::bindGLArray()
glBindVertexArray(mGLArray);
#endif
sGLRenderArray = mGLArray;
+
+ if (mGLIndices)
+ {
+ sGLRenderIndices = mGLIndices;
+ sIBOActive = TRUE;
+ }
return true;
}
@@ -2082,6 +2088,8 @@ void LLVertexBuffer::setBuffer(U32 data_mask)
glBindVertexArray(0);
#endif
sGLRenderArray = 0;
+ sGLRenderIndices = 0;
+ sIBOActive = FALSE;
}
if (mGLBuffer)
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 9630d7b29f..5c36d2e131 100755
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -1034,14 +1034,11 @@ void LLFloaterPreference::refreshEnabledState()
}
// Vertex Shaders
- // Global Shader Enable
- LLCheckBoxCtrl* ctrl_shader_enable = getChild<LLCheckBoxCtrl>("BasicShaders");
// radio set for terrain detail mode
LLRadioGroup* mRadioTerrainDetail = getChild<LLRadioGroup>("TerrainDetailRadio"); // can be linked with control var
- ctrl_shader_enable->setEnabled(LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable"));
-
- BOOL shaders = ctrl_shader_enable->get();
+ BOOL shaders = gGLManager.mGLVersion >= 2.f;
+
if (shaders)
{
mRadioTerrainDetail->setValue(1);
@@ -1057,7 +1054,7 @@ void LLFloaterPreference::refreshEnabledState()
// *HACK just checks to see if we can use shaders...
// maybe some cards that use shaders, but don't support windlight
- ctrl_wind_light->setEnabled(ctrl_shader_enable->getEnabled() && shaders);
+ ctrl_wind_light->setEnabled(shaders);
//Deferred/SSAO/Shadows
LLCheckBoxCtrl* ctrl_deferred = getChild<LLCheckBoxCtrl>("UseLightShaders");
@@ -1095,7 +1092,6 @@ void LLFloaterPreference::disableUnavailableSettings()
LLComboBox* ctrl_reflections = getChild<LLComboBox>("Reflections");
LLCheckBoxCtrl* ctrl_avatar_vp = getChild<LLCheckBoxCtrl>("AvatarVertexProgram");
LLCheckBoxCtrl* ctrl_avatar_cloth = getChild<LLCheckBoxCtrl>("AvatarCloth");
- LLCheckBoxCtrl* ctrl_shader_enable = getChild<LLCheckBoxCtrl>("BasicShaders");
LLCheckBoxCtrl* ctrl_wind_light = getChild<LLCheckBoxCtrl>("WindLightUseAtmosShaders");
LLCheckBoxCtrl* ctrl_avatar_impostors = getChild<LLCheckBoxCtrl>("AvatarImpostors");
LLCheckBoxCtrl* ctrl_deferred = getChild<LLCheckBoxCtrl>("UseLightShaders");
@@ -1106,9 +1102,6 @@ void LLFloaterPreference::disableUnavailableSettings()
// if vertex shaders off, disable all shader related products
if (!LLFeatureManager::getInstance()->isFeatureAvailable("VertexShaderEnable"))
{
- ctrl_shader_enable->setEnabled(FALSE);
- ctrl_shader_enable->setValue(FALSE);
-
ctrl_wind_light->setEnabled(FALSE);
ctrl_wind_light->setValue(FALSE);
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index d3f5ebcf1c..17d2a04301 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -450,8 +450,8 @@ void LLViewerShaderMgr::setShaders()
LLGLSLShader::sIndexedTextureChannels = llmax(llmin(gGLManager.mNumTextureImageUnits, (S32) gSavedSettings.getU32("RenderMaxTextureIndex")), 1);
- if (LLRender::sGLCoreProfile)
- {
+ if (LLRender::sGLCoreProfile || gGLManager.mGLVersion >= 2.f)
+ { //ALWAYS use shaders where available
if (!gSavedSettings.getBOOL("VertexShaderEnable"))
{ //vertex shaders MUST be enabled to use core profile
gSavedSettings.setBOOL("VertexShaderEnable", TRUE);
@@ -1122,8 +1122,6 @@ BOOL LLViewerShaderMgr::loadShadersDeferred()
return TRUE;
}
- mVertexShaderLevel[SHADER_AVATAR] = 1;
-
BOOL success = TRUE;
if (success)
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 f7666bdc4c..c25c1f23f5 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_graphics1.xml
@@ -204,20 +204,6 @@
name="LocalLights"
top_pad="1"
width="256" />
- <check_box
- control_name="VertexShaderEnable"
- height="16"
- initial_value="true"
- label="Basic shaders"
- layout="topleft"
- left_delta="0"
- name="BasicShaders"
- tool_tip="Disabling this option may prevent some graphics card drivers from crashing"
- top_pad="1"
- width="315">
- <check_box.commit_callback
- function="Pref.VertexShaderEnable" />
- </check_box>
<check_box
control_name="WindLightUseAtmosShaders"
height="16"