Skip to content

Commit

Permalink
Simplify trace and showSkel for debugging.
Browse files Browse the repository at this point in the history
r_showSkel 2 removes the md5 texture but there is no interaction.

Use r_showTrace if you don't see a crap.

Some libdll (gcc9).
  • Loading branch information
Cowcat5150 committed Jan 5, 2021
1 parent 614333c commit 08d7329
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
7 changes: 6 additions & 1 deletion neo/renderer/Model_md5.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -686,14 +686,18 @@ void idRenderModelMD5::DrawJoints( const renderEntity_t *ent, const struct viewD
pos = ent->origin + joint->ToVec3() * ent->axis;
if ( md5Joint->parent ) {
parentNum = md5Joint->parent - joints.Ptr();
session->rw->DebugLine( colorWhite, ent->origin + ent->joints[ parentNum ].ToVec3() * ent->axis, pos );
//session->rw->DebugLine( colorWhite, ent->origin + ent->joints[ parentNum ].ToVec3() * ent->axis, pos );
session->rw->DebugLine( colorMagenta, ent->origin + ent->joints[ parentNum ].ToVec3() * ent->axis, pos );
}

/*
session->rw->DebugLine( colorRed, pos, pos + joint->ToMat3()[ 0 ] * 2.0f * ent->axis );
session->rw->DebugLine( colorGreen, pos, pos + joint->ToMat3()[ 1 ] * 2.0f * ent->axis );
session->rw->DebugLine( colorBlue, pos, pos + joint->ToMat3()[ 2 ] * 2.0f * ent->axis );
*/
}

/*
idBounds bounds;
bounds.FromTransformedBounds( ent->bounds, vec3_zero, ent->axis );
Expand All @@ -711,6 +715,7 @@ void idRenderModelMD5::DrawJoints( const renderEntity_t *ent, const struct viewD
session->rw->DrawText( joints[ i ].name, pos + offset, scale, colorWhite, view->renderView.viewaxis, 1 );
}
}
*/
}

/*
Expand Down
2 changes: 1 addition & 1 deletion neo/renderer/RenderSystem_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ idCVar r_showOverDraw( "r_showOverDraw", "0", CVAR_RENDERER | CVAR_INTEGER, "1 =
idCVar r_lockSurfaces( "r_lockSurfaces", "0", CVAR_RENDERER | CVAR_BOOL, "allow moving the view point without changing the composition of the scene, including culling" );
idCVar r_useEntityCallbacks( "r_useEntityCallbacks", "1", CVAR_RENDERER | CVAR_BOOL, "if 0, issue the callback immediately at update time, rather than defering" );

idCVar r_showSkel( "r_showSkel", "0", CVAR_RENDERER | CVAR_INTEGER, "draw the skeleton when model animates, 1 = draw model with skeleton, 2 = draw skeleton only", 0, 2, idCmdSystem::ArgCompletion_Integer<0,2> );
idCVar r_showSkel( "r_showSkel", "0", CVAR_RENDERER | CVAR_INTEGER | CVAR_ARCHIVE, "draw the skeleton when model animates, 1 = draw model with skeleton, 2 = draw skeleton only", 0, 2, idCmdSystem::ArgCompletion_Integer<0,2> );
idCVar r_jointNameScale( "r_jointNameScale", "0.02", CVAR_RENDERER | CVAR_FLOAT, "size of joint names when r_showskel is set to 1" );
idCVar r_jointNameOffset( "r_jointNameOffset", "0.5", CVAR_RENDERER | CVAR_FLOAT, "offset of joint names when r_showskel is set to 1" );

Expand Down
4 changes: 2 additions & 2 deletions neo/renderer/tr_trace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ void RB_ShowTrace( drawSurf_t **drawSurfs, int numDrawSurfs ) {
GL_State( GLS_DEPTHFUNC_ALWAYS );

qglColor4f( 1, 1, 1, 1 );
RB_DrawBounds( tri->bounds );
//RB_DrawBounds( tri->bounds ); // Cowcat

if ( radius != 0.0f ) {
// draw the expanded triangles
Expand All @@ -420,7 +420,7 @@ void RB_ShowTrace( drawSurf_t **drawSurfs, int numDrawSurfs ) {
hit = R_LocalTrace( localStart, localEnd, radius, tri );
if ( hit.fraction < 1.0 ) {
qglColor4f( 1, 1, 1, 1 );
RB_DrawBounds( idBounds( hit.point ).Expand( 1 ) );
//RB_DrawBounds( idBounds( hit.point ).Expand( 1 ) ); // Cowcat
}
}
}
Binary file added neo/sys/morphos/libdll.a
Binary file not shown.

0 comments on commit 08d7329

Please sign in to comment.