mirror of
https://github.com/UberGames/ioef.git
synced 2025-05-30 17:01:23 +00:00
* Rewrite of R_LoadImage to make it more generic and data driven
This commit is contained in:
parent
6993861080
commit
034e6e8f20
6 changed files with 117 additions and 44 deletions
|
@ -2416,7 +2416,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;
|
||||
|
@ -2494,13 +2493,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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue