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')
-rw-r--r--source/blender/gpu/CMakeLists.txt12
-rw-r--r--source/blender/gpu/intern/gpu_extensions.c7
2 files changed, 16 insertions, 3 deletions
diff --git a/source/blender/gpu/CMakeLists.txt b/source/blender/gpu/CMakeLists.txt
index 5de7b0c5281..02a43abf098 100644
--- a/source/blender/gpu/CMakeLists.txt
+++ b/source/blender/gpu/CMakeLists.txt
@@ -24,8 +24,6 @@
#
# ***** END GPL LICENSE BLOCK *****
-FILE(GLOB SRC intern/*.c)
-
SET(INC
.
../blenlib
@@ -39,6 +37,16 @@ SET(INC
../../../intern/smoke/extern
)
+SET(SRC
+ intern/gpu_buffers.c
+ intern/gpu_codegen.c
+ intern/gpu_draw.c
+ intern/gpu_extensions.c
+ intern/gpu_material.c
+ intern/gpu_shader_material.glsl.c
+ intern/gpu_shader_vertex.glsl.c
+)
+
IF(WIN32)
INCLUDE_DIRECTORIES(${PTHREADS_INC})
ENDIF(WIN32)
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;
}