void OSystem_3DS::destroyGraphics() { _gameScreen.free(); _gameTopTexture.free(); _gameBottomTexture.free(); _overlay.free(); shaderProgramFree(&_program); DVLB_Free(_dvlb); C3D_RenderTargetDelete(_renderTargetTop); C3D_RenderTargetDelete(_renderTargetBottom); C3D_Fini(); }
void gfxCleanup() { if(scale2xBuffer != NULL) { linearFree(scale2xBuffer); scale2xBuffer = NULL; } if(screenBuffer != NULL) { linearFree(screenBuffer); screenBuffer = NULL; } if(borderInit) { C3D_TexDelete(&borderTexture); borderInit = false; } if(screenInit) { C3D_TexDelete(&screenTexture); screenInit = false; } if(shaderInitialized) { shaderProgramFree(&program); shaderInitialized = false; } if(dvlb != NULL) { DVLB_Free(dvlb); dvlb = NULL; } if(targetTop != NULL) { C3D_RenderTargetDelete(targetTop); targetTop = NULL; } if(targetBottom != NULL) { C3D_RenderTargetDelete(targetBottom); targetBottom = NULL; } if(c3dInitialized) { C3D_Fini(); c3dInitialized = false; } gfxExit(); }