diff options
Diffstat (limited to 'intern')
-rw-r--r-- | intern/ghost/intern/GHOST_WindowCocoa.mm | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/intern/ghost/intern/GHOST_WindowCocoa.mm b/intern/ghost/intern/GHOST_WindowCocoa.mm index 01217dfd17a..fbb474cb20a 100644 --- a/intern/ghost/intern/GHOST_WindowCocoa.mm +++ b/intern/ghost/intern/GHOST_WindowCocoa.mm @@ -34,6 +34,7 @@ #endif #include <OpenGL/gl.h> +#include <OpenGL/CGLRenderers.h> /***** Multithreaded opengl code : uncomment for enabling #include <OpenGL/OpenGL.h> */ @@ -485,7 +486,14 @@ GHOST_WindowCocoa::GHOST_WindowCocoa( // needed for 'Draw Overlap' drawing method pixelFormatAttrsWindow[i++] = NSOpenGLPFABackingStore; - pixelFormatAttrsWindow[i++] = NSOpenGLPFAAccelerated; + // Force software OpenGL, for debugging + if(getenv("BLENDER_SOFTWAREGL")) { + pixelFormatAttrsWindow[i++] = NSOpenGLPFARendererID; + pixelFormatAttrsWindow[i++] = kCGLRendererGenericID; + } + else + pixelFormatAttrsWindow[i++] = NSOpenGLPFAAccelerated; + //pixelFormatAttrsWindow[i++] = NSOpenGLPFAAllowOfflineRenderers,; // Removed to allow 10.4 builds, and 2 GPUs rendering is not used anyway pixelFormatAttrsWindow[i++] = NSOpenGLPFADepthSize; @@ -521,7 +529,14 @@ GHOST_WindowCocoa::GHOST_WindowCocoa( // needed for 'Draw Overlap' drawing method pixelFormatAttrsWindow[i++] = NSOpenGLPFABackingStore; - pixelFormatAttrsWindow[i++] = NSOpenGLPFAAccelerated; + // Force software OpenGL, for debugging + if(getenv("BLENDER_SOFTWAREGL")) { + pixelFormatAttrsWindow[i++] = NSOpenGLPFARendererID; + pixelFormatAttrsWindow[i++] = kCGLRendererGenericID; + } + else + pixelFormatAttrsWindow[i++] = NSOpenGLPFAAccelerated; + //pixelFormatAttrsWindow[i++] = NSOpenGLPFAAllowOfflineRenderers,; // Removed to allow 10.4 builds, and 2 GPUs rendering is not used anyway pixelFormatAttrsWindow[i++] = NSOpenGLPFADepthSize; |