MCPcopy Create free account
hub / github.com/dhewm/dhewm3 / FreeModel

Method FreeModel

neo/renderer/ModelManager.cpp:363–387  ·  view source on GitHub ↗

================= idRenderModelManagerLocal::FreeModel ================= */

Source from the content-addressed store, hash-verified

361=================
362*/
363void idRenderModelManagerLocal::FreeModel( idRenderModel *model ) {
364 if ( !model ) {
365 return;
366 }
367 if ( !dynamic_cast<idRenderModelStatic *>( model ) ) {
368 common->Error( "idRenderModelManager::FreeModel: model '%s' is not a static model", model->Name() );
369 return;
370 }
371 if ( model == defaultModel ) {
372 common->Error( "idRenderModelManager::FreeModel: can't free the default model" );
373 return;
374 }
375 if ( model == beamModel ) {
376 common->Error( "idRenderModelManager::FreeModel: can't free the beam model" );
377 return;
378 }
379 if ( model == spriteModel ) {
380 common->Error( "idRenderModelManager::FreeModel: can't free the sprite model" );
381 return;
382 }
383
384 R_CheckForEntityDefsUsingModel( model );
385
386 delete model;
387}
388
389/*
390=================

Callers 9

~idBrittleFractureMethod · 0.45
ShutdownMethod · 0.45
FreeRendererStateMethod · 0.45
CombineModelSurfacesFunction · 0.45
WriteRenderBumpFunction · 0.45
RenderBumpFlat_fFunction · 0.45
~idBrittleFractureMethod · 0.45
ShutdownMethod · 0.45

Calls 3

ErrorMethod · 0.45
NameMethod · 0.45

Tested by

no test coverage detected