OSDN Git Service

Disable occlusion culling by default
authorLatif Khalifa <latifer@streamgrid.net>
Wed, 27 Feb 2013 02:53:32 +0000 (03:53 +0100)
committerLatif Khalifa <latifer@streamgrid.net>
Wed, 27 Feb 2013 02:53:32 +0000 (03:53 +0100)
Radegast/GUI/Dialogs/Settings.cs
Radegast/GUI/Rendering/GraphicsPreferences.cs
Radegast/GUI/Rendering/PrimWorkshop.cs
Radegast/GUI/Rendering/Rendering.cs

index eb1fcb3..9448b0f 100644 (file)
@@ -111,7 +111,7 @@ namespace Radegast
 
             if (!s.ContainsKey("taskbar_highlight")) s["taskbar_highlight"] = true;
 
-            if (!s.ContainsKey("rendering_occlusion_culling_enabled")) s["rendering_occlusion_culling_enabled"] = true;
+            if (!s.ContainsKey("rendering_occlusion_culling_enabled2")) s["rendering_occlusion_culling_enabled2"] = false;
 
             if (!s.ContainsKey("rendering_use_vbo")) s["rendering_use_vbo"] = true;
 
index 5f62159..a833d3c 100644 (file)
@@ -78,7 +78,7 @@ namespace Radegast.Rendering
             {
                 cbWaterReflections.Checked = instance.GlobalSettings["water_reflections"];
             }
-            cbOcclusionCulling.Checked = Instance.GlobalSettings["rendering_occlusion_culling_enabled"];
+            cbOcclusionCulling.Checked = Instance.GlobalSettings["rendering_occlusion_culling_enabled2"];
             cbShiny.Checked = Instance.GlobalSettings["scene_viewer_shiny"];
             cbVBO.Checked = Instance.GlobalSettings["rendering_use_vbo"];
         }
@@ -134,10 +134,10 @@ namespace Radegast.Rendering
 
         private void cbOcclusionCulling_CheckedChanged(object sender, EventArgs e)
         {
-            Instance.GlobalSettings["rendering_occlusion_culling_enabled"] = cbOcclusionCulling.Checked;
+            Instance.GlobalSettings["rendering_occlusion_culling_enabled2"] = cbOcclusionCulling.Checked;
             if (Window != null)
             {
-                RenderSettings.OcclusionCullingEnabled = Instance.GlobalSettings["rendering_occlusion_culling_enabled"]
+                RenderSettings.OcclusionCullingEnabled = Instance.GlobalSettings["rendering_occlusion_culling_enabled2"]
                     && (RenderSettings.ARBQuerySupported || RenderSettings.CoreQuerySupported);
             }
         }
index 0b054f3..3d36e1a 100644 (file)
@@ -302,7 +302,7 @@ namespace Radegast.Rendering
                 RenderSettings.ARBQuerySupported = context.GetAddress("glGetQueryObjectivARB") != IntPtr.Zero;
                 RenderSettings.CoreQuerySupported = context.GetAddress("glGetQueryObjectiv") != IntPtr.Zero;
                 RenderSettings.OcclusionCullingEnabled = (RenderSettings.CoreQuerySupported || RenderSettings.ARBQuerySupported)
-                    && instance.GlobalSettings["rendering_occlusion_culling_enabled"];
+                    && instance.GlobalSettings["rendering_occlusion_culling_enabled2"];
 
                 // Mipmap
                 RenderSettings.HasMipmap = context.GetAddress("glGenerateMipmap") != IntPtr.Zero;
@@ -323,7 +323,7 @@ namespace Radegast.Rendering
                 RenderSettings.TextureNonPowerOfTwoSupported = glExtensions.Contains("texture_non_power_of_two");
 
                 // Occlusion culling
-                RenderSettings.OcclusionCullingEnabled = Instance.GlobalSettings["rendering_occlusion_culling_enabled"]
+                RenderSettings.OcclusionCullingEnabled = Instance.GlobalSettings["rendering_occlusion_culling_enabled2"]
                     && (RenderSettings.ARBQuerySupported || RenderSettings.CoreQuerySupported);
 
                 // Shiny
index 70e40ed..73ffd20 100644 (file)
@@ -684,7 +684,7 @@ namespace Radegast.Rendering
                 RenderSettings.ARBQuerySupported = context.GetAddress("glGetQueryObjectivARB") != IntPtr.Zero;
                 RenderSettings.CoreQuerySupported = context.GetAddress("glGetQueryObjectiv") != IntPtr.Zero;
                 RenderSettings.OcclusionCullingEnabled = (RenderSettings.CoreQuerySupported || RenderSettings.ARBQuerySupported)
-                    && instance.GlobalSettings["rendering_occlusion_culling_enabled"];
+                    && instance.GlobalSettings["rendering_occlusion_culling_enabled2"];
 
                 // Mipmap
                 RenderSettings.HasMipmap = context.GetAddress("glGenerateMipmap") != IntPtr.Zero;
@@ -705,7 +705,7 @@ namespace Radegast.Rendering
                 RenderSettings.TextureNonPowerOfTwoSupported = glExtensions.Contains("texture_non_power_of_two");
 
                 // Occlusion culling
-                RenderSettings.OcclusionCullingEnabled = Instance.GlobalSettings["rendering_occlusion_culling_enabled"]
+                RenderSettings.OcclusionCullingEnabled = Instance.GlobalSettings["rendering_occlusion_culling_enabled2"]
                     && (RenderSettings.ARBQuerySupported || RenderSettings.CoreQuerySupported);
 
                 // Shiny