summaryrefslogtreecommitdiff
path: root/src/renderergl1/tr_model.c
diff options
context:
space:
mode:
authorZack Middleton <zturtleman@gmail.com>2013-05-03 14:28:18 -0500
committerTim Angus <tim@ngus.net>2013-05-31 23:10:45 +0100
commita65a03b1fb3a491738e9849764fa61388c147db9 (patch)
treeb53a9a1ee399a3d4dba6d1968b5d4e3fa0f4478b /src/renderergl1/tr_model.c
parent0184118755239f5eef8f3e44abc12e8257b11a08 (diff)
Show surface names in excessive vertexes and triangles warnings
Add newlines to renderergl2's R_LoadMD3 vertex and triangle warnings.
Diffstat (limited to 'src/renderergl1/tr_model.c')
-rw-r--r--src/renderergl1/tr_model.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/src/renderergl1/tr_model.c b/src/renderergl1/tr_model.c
index 770d0066..5ca53031 100644
--- a/src/renderergl1/tr_model.c
+++ b/src/renderergl1/tr_model.c
@@ -460,13 +460,15 @@ static qboolean R_LoadMD3 (model_t *mod, int lod, void *buffer, const char *mod_
LL(surf->ofsEnd);
if ( surf->numVerts > SHADER_MAX_VERTEXES ) {
- ri.Printf(PRINT_WARNING, "R_LoadMD3: %s has more than %i verts on a surface (%i).\n",
- mod_name, SHADER_MAX_VERTEXES, surf->numVerts );
+ ri.Printf(PRINT_WARNING, "R_LoadMD3: %s has more than %i verts on %s (%i).\n",
+ mod_name, SHADER_MAX_VERTEXES, surf->name[0] ? surf->name : "a surface",
+ surf->numVerts );
return qfalse;
}
if ( surf->numTriangles*3 > SHADER_MAX_INDEXES ) {
- ri.Printf(PRINT_WARNING, "R_LoadMD3: %s has more than %i triangles on a surface (%i).\n",
- mod_name, SHADER_MAX_INDEXES / 3, surf->numTriangles );
+ ri.Printf(PRINT_WARNING, "R_LoadMD3: %s has more than %i triangles on %s (%i).\n",
+ mod_name, SHADER_MAX_INDEXES / 3, surf->name[0] ? surf->name : "a surface",
+ surf->numTriangles );
return qfalse;
}
@@ -737,14 +739,16 @@ static qboolean R_LoadMDR( model_t *mod, void *buffer, int filesize, const char
// now do the checks that may fail.
if ( surf->numVerts > SHADER_MAX_VERTEXES )
{
- ri.Printf(PRINT_WARNING, "R_LoadMDR: %s has more than %i verts on a surface (%i).\n",
- mod_name, SHADER_MAX_VERTEXES, surf->numVerts );
+ ri.Printf(PRINT_WARNING, "R_LoadMDR: %s has more than %i verts on %s (%i).\n",
+ mod_name, SHADER_MAX_VERTEXES, surf->name[0] ? surf->name : "a surface",
+ surf->numVerts );
return qfalse;
}
if ( surf->numTriangles*3 > SHADER_MAX_INDEXES )
{
- ri.Printf(PRINT_WARNING, "R_LoadMDR: %s has more than %i triangles on a surface (%i).\n",
- mod_name, SHADER_MAX_INDEXES / 3, surf->numTriangles );
+ ri.Printf(PRINT_WARNING, "R_LoadMDR: %s has more than %i triangles on %s (%i).\n",
+ mod_name, SHADER_MAX_INDEXES / 3, surf->name[0] ? surf->name : "a surface",
+ surf->numTriangles );
return qfalse;
}
// lowercase the surface name so skin compares are faster
@@ -951,13 +955,15 @@ static qboolean R_LoadMD4( model_t *mod, void *buffer, const char *mod_name ) {
LL(surf->ofsEnd);
if ( surf->numVerts > SHADER_MAX_VERTEXES ) {
- ri.Printf(PRINT_WARNING, "R_LoadMD4: %s has more than %i verts on a surface (%i).\n",
- mod_name, SHADER_MAX_VERTEXES, surf->numVerts );
+ ri.Printf(PRINT_WARNING, "R_LoadMD4: %s has more than %i verts on %s (%i).\n",
+ mod_name, SHADER_MAX_VERTEXES, surf->name[0] ? surf->name : "a surface",
+ surf->numVerts );
return qfalse;
}
if ( surf->numTriangles*3 > SHADER_MAX_INDEXES ) {
- ri.Printf(PRINT_WARNING, "R_LoadMD4: %s has more than %i triangles on a surface (%i).\n",
- mod_name, SHADER_MAX_INDEXES / 3, surf->numTriangles );
+ ri.Printf(PRINT_WARNING, "R_LoadMD4: %s has more than %i triangles on %s (%i).\n",
+ mod_name, SHADER_MAX_INDEXES / 3, surf->name[0] ? surf->name : "a surface",
+ surf->numTriangles );
return qfalse;
}