Show additional information only in the DEBUG build
diff --git a/src/engine/GPURenderer/r_glsl.cpp b/src/engine/GPURenderer/r_glsl.cpp
index 97ef81a..2ef742b 100644
--- a/src/engine/GPURenderer/r_glsl.cpp
+++ b/src/engine/GPURenderer/r_glsl.cpp
@@ -434,7 +434,9 @@ static sint GLSL_LoadGPUShaderText( pointer name, uint shaderType, valueType* de
}
size = fileSystem->ReadFile( filename, ( void** )&buffer );
+#ifdef _DEBUG
CL_RefPrintf( PRINT_DEVELOPER, "...loading '%s'\n", filename );
+#endif
shaderText = buffer;
size += 1;
@@ -497,14 +499,17 @@ static void GLSL_ShowProgramUniforms( uint program )
for( i = 0; i < count; i++ )
{
qglGetActiveUniform( program, i, sizeof( uniformName ), nullptr, &size, &type, uniformName );
-
+#ifdef _DEBUG
CL_RefPrintf( PRINT_DEVELOPER, "active uniform: '%s'\n", uniformName );
+#endif
}
}
static sint GLSL_InitGPUShader2( shaderProgram_t* program, pointer name, sint attribs, pointer vpCode, pointer fpCode )
{
+#ifdef _DEBUG
CL_RefPrintf( PRINT_DEVELOPER, "------- GPU shader -------\n" );
+#endif
if( strlen( name ) >= MAX_QPATH )
{
diff --git a/src/engine/GPURenderer/r_image.cpp b/src/engine/GPURenderer/r_image.cpp
index 0ef16f4..7028c81 100644
--- a/src/engine/GPURenderer/r_image.cpp
+++ b/src/engine/GPURenderer/r_image.cpp
@@ -2452,8 +2452,9 @@ void R_LoadImage( pointer name, uchar8** pic, sint* width, sint* height, uint* p
{
if( orgNameFailed )
{
- CL_RefPrintf( PRINT_DEVELOPER, "WARNING: %s not present, using %s instead\n",
- name, altName );
+#ifdef _DEBUG
+ CL_RefPrintf( PRINT_DEVELOPER, "WARNING: %s not present, using %s instead\n", name, altName );
+#endif
}
break;
diff --git a/src/engine/GPURenderer/r_model.cpp b/src/engine/GPURenderer/r_model.cpp
index c80ee4d..521a5c9 100644
--- a/src/engine/GPURenderer/r_model.cpp
+++ b/src/engine/GPURenderer/r_model.cpp
@@ -373,7 +373,9 @@ qhandle_t idRenderSystemLocal::RegisterModel( pointer name )
{
if( orgNameFailed )
{
+#ifdef _DEBUG
CL_RefPrintf( PRINT_DEVELOPER, "WARNING: %s not present, using %s instead\n", name, altName );
+#endif
}
break;
diff --git a/src/engine/GPURenderer/r_shader.cpp b/src/engine/GPURenderer/r_shader.cpp
index 998abc1..bda72a7 100644
--- a/src/engine/GPURenderer/r_shader.cpp
+++ b/src/engine/GPURenderer/r_shader.cpp
@@ -2625,7 +2625,9 @@ static bool ParseShader( pointer name, valueType** text )
shader.surfaceFlags |= MATERIAL_CARPET;
else
{
+#ifdef _DEBUG
CL_RefPrintf( PRINT_DEVELOPER, "Could not work out a default surface type for shader %s. It will fallback to default parallax and specular.\n", name );
+#endif
}
}
diff --git a/src/engine/audio/s_dmahd.cpp b/src/engine/audio/s_dmahd.cpp
index 0c95056..215346c 100644
--- a/src/engine/audio/s_dmahd.cpp
+++ b/src/engine/audio/s_dmahd.cpp
@@ -507,7 +507,9 @@ bool dmaHD_LoadSound( sfx_t* sfx )
}
// Information
+#ifdef _DEBUG
Com_DPrintf( "Loading sound: %s", sfx->soundName );
+#endif
if( info.width == 1 )
{
Com_DPrintf( " [8 bit -> 16 bit]" );
GitHub
sha: 542063e2