summaryrefslogtreecommitdiff
path: root/src/renderer/tr_shader.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/renderer/tr_shader.c')
-rw-r--r--src/renderer/tr_shader.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/renderer/tr_shader.c b/src/renderer/tr_shader.c
index dd51a974..499c335a 100644
--- a/src/renderer/tr_shader.c
+++ b/src/renderer/tr_shader.c
@@ -2361,7 +2361,7 @@ shader_t *R_FindShaderByName( const char *name ) {
int hash;
shader_t *sh;
- if ( (name==NULL) || (name[0] == 0) ) { // bk001205
+ if ( (name==NULL) || (name[0] == 0) ) {
return tr.defaultShader;
}
@@ -2417,7 +2417,6 @@ most world construction surfaces.
*/
shader_t *R_FindShader( const char *name, int lightmapIndex, qboolean mipRawImage ) {
char strippedName[MAX_QPATH];
- char fileName[MAX_QPATH];
int i, hash;
char *shaderText;
image_t *image;
@@ -2495,13 +2494,11 @@ shader_t *R_FindShader( const char *name, int lightmapIndex, qboolean mipRawImag
//
// if not defined in the in-memory shader descriptions,
- // look for a single TGA, BMP, or PCX
+ // look for a single supported image file
//
- Q_strncpyz( fileName, name, sizeof( fileName ) );
- COM_DefaultExtension( fileName, sizeof( fileName ), ".tga" );
- image = R_FindImageFile( fileName, mipRawImage, mipRawImage, mipRawImage ? GL_REPEAT : GL_CLAMP );
+ image = R_FindImageFile( name, mipRawImage, mipRawImage, mipRawImage ? GL_REPEAT : GL_CLAMP );
if ( !image ) {
- ri.Printf( PRINT_DEVELOPER, "Couldn't find image for shader %s\n", name );
+ ri.Printf( PRINT_DEVELOPER, "Couldn't find image file for shader %s\n", name );
shader.defaultShader = qtrue;
return FinishShader();
}
@@ -2774,7 +2771,7 @@ it and returns a valid (possibly default) shader_t to be used internally.
*/
shader_t *R_GetShaderByHandle( qhandle_t hShader ) {
if ( hShader < 0 ) {
- ri.Printf( PRINT_WARNING, "R_GetShaderByHandle: out of range hShader '%d'\n", hShader ); // bk: FIXME name
+ ri.Printf( PRINT_WARNING, "R_GetShaderByHandle: out of range hShader '%d'\n", hShader );
return tr.defaultShader;
}
if ( hShader >= tr.numShaders ) {