From 6cd0a28ff2cb3f1e249b524622abf411536be716 Mon Sep 17 00:00:00 2001
From: Sven Gothel
Date: Mon, 4 Aug 2014 14:10:47 +0200
Subject: Bug 1036: Renamed property to switch off NVidia Windows workaround
'jogl.windows.cpu_affinity_mode' (dropping '.debug')
---
.../jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
(limited to 'src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java')
diff --git a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java
index 8dc77d985..23974c3ce 100644
--- a/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java
+++ b/src/jogl/classes/jogamp/opengl/windows/wgl/WindowsWGLDrawableFactory.java
@@ -78,6 +78,7 @@ import jogamp.opengl.GLGraphicsConfigurationUtil;
import jogamp.opengl.SharedResourceRunner;
import com.jogamp.common.nio.PointerBuffer;
+import com.jogamp.common.util.PropertyAccess;
import com.jogamp.common.util.ReflectionUtil;
import com.jogamp.nativewindow.windows.WindowsGraphicsDevice;
import com.jogamp.opengl.GLExtensions;
@@ -111,7 +112,7 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl {
* or because the driver's worker thread is bound to the same CPU.
*
*
- * Property integer value jogl.debug.windows.cpu_affinity_mode
:
+ * Property integer value jogl.windows.cpu_affinity_mode
:
*
* - 0 - none (no affinity, may cause driver crash with 'Threaded optimization' = ['auto', 'on'])
* - 1 - process affinity (default, workaround for driver crash for 'Threaded optimization' = 'auto', still crashes if set to 'on')
@@ -122,7 +123,12 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl {
* (don't ask why ..)
*
*/
- private static final int CPU_AFFINITY_MODE = Debug.getIntProperty("jogl.debug.windows.cpu_affinity_mode", true, 1);
+ private static final int CPU_AFFINITY_MODE;
+
+ static {
+ Debug.initSingleton();
+ CPU_AFFINITY_MODE = PropertyAccess.getIntProperty("jogl.windows.cpu_affinity_mode", true, 1);
+ }
private static DesktopGLDynamicLookupHelper windowsWGLDynamicLookupHelper = null;
--
cgit v1.2.3