void MarkNoShadowFaces() { #if defined( SCRATCHPAD_NO_SHADOW_FACES ) g_pPad = ScratchPad3D_Create(); ScratchPad_DrawWorld( g_pPad, false, CSPColor(1,1,1,0.3) ); for ( int iFace=0; iFace < numfaces; iFace++ ) { dface_t *pFace = &dfaces[iFace]; if ( !pFace->AreDynamicShadowsEnabled() ) { ScratchPad_DrawFace( g_pPad, pFace, iFace, CSPColor(1,0,0,1), Vector(1,0,0) ); ScratchPad_DrawFace( g_pPad, pFace, iFace, CSPColor(1,0,0,1), Vector(-1,0,0) ); ScratchPad_DrawFace( g_pPad, pFace, iFace, CSPColor(1,0,0,1), Vector(0,1,0) ); } } g_pPad->Release(); #endif }
void ScratchPad_DrawWorld( IScratchPad3D *pPad, bool bDrawFaceNumbers, const CSPColor &faceColor ) { bool bAutoFlush = pPad->GetAutoFlush(); pPad->SetAutoFlush( false ); for ( int i=0; i < numleafs; i++ ) { dleaf_t *l = &dleafs[i]; if ( l->contents & CONTENTS_DETAIL ) continue; for ( int z=0; z < l->numleaffaces; z++ ) { int iFace = dleaffaces[l->firstleafface+z]; dface_t *f = &dfaces[iFace]; ScratchPad_DrawFace( pPad, f, bDrawFaceNumbers ? i : -1 ); } } pPad->SetAutoFlush( bAutoFlush ); }