Added a -noglsl option to disable GLSL from the command line.
[blender.git] / source / blender / gpu / intern / gpu_extensions.c
index a8dc369460cd656c1d1270116d832c046decb9ff..7654c67419bf29f26591dad685904bce8f94fc0c 100644 (file)
        - arb draw buffers? 2.0 core
 */
 
-struct GPUGlobal {
+static struct GPUGlobal {
        GLint maxtextures;
        GLuint currentfb;
        int minimumsupport;
-} GG = {1, 0, 0};
+       int extdisabled;
+} GG = {1, 0, 0, 0};
+
+void GPU_extensions_disable()
+{
+       GG.extdisabled = 1;
+}
 
 void GPU_extensions_init()
 {
@@ -89,7 +95,7 @@ void GPU_extensions_init()
 
 int GPU_extensions_minimum_support()
 {
-       return GG.minimumsupport;
+       return !GG.extdisabled && GG.minimumsupport;
 }
 
 int GPU_print_error(char *str)