summaryrefslogtreecommitdiff
path: root/src/renderergl2/tr_glsl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/renderergl2/tr_glsl.c')
-rw-r--r--src/renderergl2/tr_glsl.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/renderergl2/tr_glsl.c b/src/renderergl2/tr_glsl.c
index 58a00e6e..ed078ddf 100644
--- a/src/renderergl2/tr_glsl.c
+++ b/src/renderergl2/tr_glsl.c
@@ -400,24 +400,30 @@ static int GLSL_LoadGPUShaderText(const char *name, const char *fallback,
Com_sprintf(filename, sizeof(filename), "glsl/%s_fp.glsl", name);
}
- ri.Printf(PRINT_DEVELOPER, "...loading '%s'\n", filename);
- size = ri.FS_ReadFile(filename, (void **)&buffer);
+ if ( r_externalGLSL->integer ) {
+ size = ri.FS_ReadFile(filename, (void **)&buffer);
+ } else {
+ size = 0;
+ buffer = NULL;
+ }
+
if(!buffer)
{
if (fallback)
{
- ri.Printf(PRINT_DEVELOPER, "couldn't load, using fallback\n");
+ ri.Printf(PRINT_DEVELOPER, "...loading built-in '%s'\n", filename);
shaderText = fallback;
size = strlen(shaderText);
}
else
{
- ri.Printf(PRINT_DEVELOPER, "couldn't load!\n");
+ ri.Printf(PRINT_DEVELOPER, "couldn't load '%s'\n", filename);
return 0;
}
}
else
{
+ ri.Printf(PRINT_DEVELOPER, "...loading '%s'\n", filename);
shaderText = buffer;
}