[Bf-blender-cvs] [8251506] blender2.8: GPU_basic_shader uses GLSL by default
Mike Erwin
noreply at git.blender.org
Wed Sep 21 20:24:15 CEST 2016
Commit: 825150605e36547a6216228deabf79153ae2ae00
Author: Mike Erwin
Date: Wed Sep 21 20:24:02 2016 +0200
Branches: blender2.8
https://developer.blender.org/rB825150605e36547a6216228deabf79153ae2ae00
GPU_basic_shader uses GLSL by default
switch back to old mode at runtime:
blender --enable-legacy-basic-shader
===================================================================
M source/blender/gpu/intern/gpu_basic_shader.c
M source/creator/creator_args.c
===================================================================
diff --git a/source/blender/gpu/intern/gpu_basic_shader.c b/source/blender/gpu/intern/gpu_basic_shader.c
index c1b9d9a..9d1e84c 100644
--- a/source/blender/gpu/intern/gpu_basic_shader.c
+++ b/source/blender/gpu/intern/gpu_basic_shader.c
@@ -269,7 +269,7 @@ const GLubyte stipple_hexagon[128] = {
/* GLSL State */
-static bool USE_GLSL = false;
+static bool USE_GLSL = true;
/**
* \note this isn't part of the basic shader API,
diff --git a/source/creator/creator_args.c b/source/creator/creator_args.c
index c3c76a0..21586d1 100644
--- a/source/creator/creator_args.c
+++ b/source/creator/creator_args.c
@@ -1186,13 +1186,13 @@ static int arg_handle_depsgraph_use_new(int UNUSED(argc), const char **UNUSED(ar
return 0;
}
-static const char arg_handle_basic_shader_glsl_use_new_doc[] =
-"\n\tUse new GLSL basic shader"
+static const char arg_handle_basic_shader_use_legacy_doc[] =
+"\n\tUse legacy (non-GLSL) basic shader"
;
-static int arg_handle_basic_shader_glsl_use_new(int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data))
+static int arg_handle_basic_shader_use_legacy(int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data))
{
- printf("Using new GLSL basic shader.\n");
- GPU_basic_shader_use_glsl_set(true);
+ printf("Using legacy (non-GLSL) basic shader.\n");
+ GPU_basic_shader_use_glsl_set(false);
return 0;
}
@@ -1830,7 +1830,7 @@ void main_args_setup(bContext *C, bArgs *ba, SYS_SystemHandle *syshandle)
CB_EX(arg_handle_debug_mode_generic_set, gpumem), (void *)G_DEBUG_GPU_MEM);
BLI_argsAdd(ba, 1, NULL, "--enable-new-depsgraph", CB(arg_handle_depsgraph_use_new), NULL);
- BLI_argsAdd(ba, 1, NULL, "--enable-new-basic-shader-glsl", CB(arg_handle_basic_shader_glsl_use_new), NULL);
+ BLI_argsAdd(ba, 1, NULL, "--enable-legacy-basic-shader", CB(arg_handle_basic_shader_use_legacy), NULL);
BLI_argsAdd(ba, 1, NULL, "--verbose", CB(arg_handle_verbosity_set), NULL);
More information about the Bf-blender-cvs
mailing list