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
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/gpu/intern/gpu_extensions.c')
-rw-r--r--source/blender/gpu/intern/gpu_extensions.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c
index c6b8a43918c..70a74aafead 100644
--- a/source/blender/gpu/intern/gpu_extensions.c
+++ b/source/blender/gpu/intern/gpu_extensions.c
@@ -91,6 +91,11 @@ void GPU_extensions_init()
GLint r, g, b;
const char *vendor, *renderer;
+ /* can't avoid calling this multiple times, see wm_window_add_ghostwindow */
+ static char init= 0;
+ if(init) return;
+ init= 1;
+
glewInit();
/* glewIsSupported("GL_VERSION_2_0") */
@@ -130,7 +135,7 @@ void GPU_extensions_init()
GG.device = GPU_DEVICE_ATI;
GG.driver = GPU_DRIVER_OPENSOURCE;
}
- else if(strstr(renderer, "Nouveau")) {
+ else if(strstr(renderer, "Nouveau") || strstr(vendor, "nouveau")) {
GG.device = GPU_DEVICE_NVIDIA;
GG.driver = GPU_DRIVER_OPENSOURCE;
}