void templateAppExit( void ) { if( font ) { FONT_free( font ); font = NULL; } if( path_point ) { SHADER_free( path_point->vertex_shader ); SHADER_free( path_point->fragment_shader ); PROGRAM_free( path_point ); path_point = NULL; } NAVIGATION_free( navigation ); free_physic_world(); SHADER_free( program->vertex_shader ); SHADER_free( program->fragment_shader ); PROGRAM_free( program ); OBJ_free( obj ); }
void templateAppExit( void ) { SHADER_free( program->vertex_shader ); SHADER_free( program->fragment_shader ); PROGRAM_free( program ); OBJ_free( obj ); }
void templateAppExit(void) { unsigned i = 0; while (i != obj->n_objmaterial) { SHADER_free(obj->objmaterial[i].program->vertex_shader); SHADER_free(obj->objmaterial[i].program->fragment_shader); PROGRAM_free(obj->objmaterial[i].program); ++i; } OBJ_free(obj); }
void templateAppExit( void ) { printf("templateAppExit...\n"); if( program && program->vertex_shader ) program->vertex_shader = SHADER_free( program->vertex_shader ); if( program && program->fragment_shader ) program->fragment_shader = SHADER_free( program->fragment_shader ); if( program ) program = PROGRAM_free( program ); }
void templateAppExit( void ) { NAVIGATION_free( navigation ); free_physic_world(); SHADER_free( program->vertex_shader ); SHADER_free( program->fragment_shader ); PROGRAM_free( program ); OBJ_free( obj ); }
void templateAppExit( void ) { if( dynamicsworld ) free_physic_world(); if( program ) { SHADER_free( program->vertex_shader ); SHADER_free( program->fragment_shader ); PROGRAM_free( program ); } if( obj ) OBJ_free( obj ); }
/*! Free a previously initialized NAVIGATION structure pointer. \param[in,out] navigation The NAVIGATION structure pointer to free from local memory. \return Return a NULL NAVIGATION structure pointer. */ NAVIGATION *NAVIGATION_free( NAVIGATION *navigation ) { if( navigation->dtnavmesh ) dtFreeNavMesh( navigation->dtnavmesh ); if( navigation->program ) { SHADER_free( navigation->program->vertex_shader ); SHADER_free( navigation->program->fragment_shader ); PROGRAM_free( navigation->program ); } free( navigation ); return NULL; }
FONT *FONT_free( FONT *font ) { if( font->program ) { SHADER_free( font->program->vertex_shader ); SHADER_free( font->program->fragment_shader ); PROGRAM_free( font->program ); } if( font->character_data ) free( font->character_data ); if( font->tid ) glDeleteTextures( 1, &font->tid ); free( font ); return NULL; }