Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2011-12-19 18:23:08 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-12-19 18:23:08 +0400
commita0af3f7ffe7af861720187b2cad47a7623400376 (patch)
tree794a1afefcb1b68d0319e3f42f4833badeb84778 /intern
parent41c992ce852c9ffc83a52041cee73e8ce6b4ec04 (diff)
OS X: add BLENDER_SOFTWAREGL environment variable to force using software OpenGL
renderer, for debugging OpenGL issues.
Diffstat (limited to 'intern')
-rw-r--r--intern/ghost/intern/GHOST_WindowCocoa.mm19
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;