GPU: make using the glsl basic-shader a flag

This allows for it to be more easily tested.
This commit is contained in:
2016-06-08 03:46:19 +10:00
parent bf54dcc3c9
commit cf8a0d08b0
3 changed files with 34 additions and 2 deletions

View File

@@ -51,8 +51,6 @@
/* State */
static const bool USE_GLSL = false;
static struct {
GPUShader *cached_shaders[GPU_SHADER_OPTION_COMBINATIONS];
bool failed_shaders[GPU_SHADER_OPTION_COMBINATIONS];
@@ -269,6 +267,24 @@ const GLubyte stipple_hexagon[128] = {
0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22};
/* ********************************************* */
/* GLSL State */
static bool USE_GLSL = false;
/**
* \note this isn't part of the basic shader API,
* only set from the command line once on startup.
*/
void GPU_basic_shader_use_glsl_set(bool enabled)
{
USE_GLSL = enabled;
}
bool GPU_basic_shader_use_glsl_get(void)
{
return USE_GLSL;
}
/* Init / exit */
void GPU_basic_shaders_init(void)