From 84cf941c291de2c3d03f3125bc29de907d47f56c Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Sun, 12 Oct 2008 18:32:26 +0000 Subject: Added a -noglsl option to disable GLSL from the command line. --- source/blender/gpu/GPU_extensions.h | 1 + source/blender/gpu/intern/gpu_extensions.c | 12 +++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'source/blender/gpu') diff --git a/source/blender/gpu/GPU_extensions.h b/source/blender/gpu/GPU_extensions.h index 3813fe3da8e..66b19449419 100644 --- a/source/blender/gpu/GPU_extensions.h +++ b/source/blender/gpu/GPU_extensions.h @@ -51,6 +51,7 @@ typedef struct GPUFrameBuffer GPUFrameBuffer; struct GPUShader; typedef struct GPUShader GPUShader; +void GPU_extensions_disable(void); void GPU_extensions_init(void); /* call this before running any of the functions below */ void GPU_extensions_exit(void); int GPU_extensions_minimum_support(void); diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c index a8dc369460c..7654c67419b 100644 --- a/source/blender/gpu/intern/gpu_extensions.c +++ b/source/blender/gpu/intern/gpu_extensions.c @@ -66,11 +66,17 @@ - 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) -- cgit v1.2.3