summaryrefslogtreecommitdiff
path: root/src/renderergl2/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/renderergl2/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/renderergl2/tr_model.c')
-rw-r--r--src/renderergl2/tr_model.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/src/renderergl2/tr_model.c b/src/renderergl2/tr_model.c
index cad7bd24..54d42a38 100644
--- a/src/renderergl2/tr_model.c
+++ b/src/renderergl2/tr_model.c
@@ -498,14 +498,16 @@ static qboolean R_LoadMD3(model_t * mod, int lod, void *buffer, int bufferSize,
if(md3Surf->numVerts > SHADER_MAX_VERTEXES)
{
- ri.Printf(PRINT_WARNING, "R_LoadMD3: %s has more than %i verts on a surface (%i)",
- modName, SHADER_MAX_VERTEXES, md3Surf->numVerts);
+ ri.Printf(PRINT_WARNING, "R_LoadMD3: %s has more than %i verts on %s (%i).\n",
+ modName, SHADER_MAX_VERTEXES, md3Surf->name[0] ? md3Surf->name : "a surface",
+ md3Surf->numVerts );
return qfalse;
}
if(md3Surf->numTriangles * 3 > SHADER_MAX_INDEXES)
{
- ri.Printf(PRINT_WARNING, "R_LoadMD3: %s has more than %i triangles on a surface (%i)",
- modName, SHADER_MAX_INDEXES / 3, md3Surf->numTriangles);
+ ri.Printf(PRINT_WARNING, "R_LoadMD3: %s has more than %i triangles on %s (%i).\n",
+ modName, SHADER_MAX_INDEXES / 3, md3Surf->name[0] ? md3Surf->name : "a surface",
+ md3Surf->numTriangles );
return qfalse;
}
@@ -997,14 +999,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
@@ -1211,13 +1215,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;
}