diff options
author | aap <aap@papnet.eu> | 2020-12-29 20:31:06 +0100 |
---|---|---|
committer | aap <aap@papnet.eu> | 2020-12-29 20:31:06 +0100 |
commit | 426364b961603a031720910598c203289bc01722 (patch) | |
tree | 03ddce6f933835ea01ccc81fac663bca53af0d86 | |
parent | Add sdk to gitignore (diff) | |
download | re3-426364b961603a031720910598c203289bc01722.tar re3-426364b961603a031720910598c203289bc01722.tar.gz re3-426364b961603a031720910598c203289bc01722.tar.bz2 re3-426364b961603a031720910598c203289bc01722.tar.lz re3-426364b961603a031720910598c203289bc01722.tar.xz re3-426364b961603a031720910598c203289bc01722.tar.zst re3-426364b961603a031720910598c203289bc01722.zip |
-rw-r--r-- | src/core/Game.cpp | 14 | ||||
-rw-r--r-- | src/core/main.cpp | 16 | ||||
-rw-r--r-- | src/extras/custompipes_d3d9.cpp | 9 |
3 files changed, 24 insertions, 15 deletions
diff --git a/src/core/Game.cpp b/src/core/Game.cpp index b6ef7635..348ac26d 100644 --- a/src/core/Game.cpp +++ b/src/core/Game.cpp @@ -262,11 +262,25 @@ CGame::InitialiseRenderWare(void) CPlayerSkin::Initialise(); POP_MEMID(); +#ifdef EXTENDED_PIPELINES + CustomPipes::CustomPipeInit(); // need Scene.world for this +#endif +#ifdef SCREEN_DROPLETS + ScreenDroplets::InitDraw(); +#endif + return (true); } void CGame::ShutdownRenderWare(void) { +#ifdef SCREEN_DROPLETS + ScreenDroplets::Shutdown(); +#endif +#ifdef EXTENDED_PIPELINES + CustomPipes::CustomPipeShutdown(); +#endif + DestroySplashScreen(); CHud::Shutdown(); CFont::Shutdown(); diff --git a/src/core/main.cpp b/src/core/main.cpp index 64ef41bc..85e04540 100644 --- a/src/core/main.cpp +++ b/src/core/main.cpp @@ -481,15 +481,7 @@ Initialise3D(void *param) DebugMenuInit(); DebugMenuPopulate(); #endif // !DEBUGMENU - bool ret = CGame::InitialiseRenderWare(); -#ifdef EXTENDED_PIPELINES - CustomPipes::CustomPipeInit(); // need Scene.world for this -#endif -#ifdef SCREEN_DROPLETS - ScreenDroplets::InitDraw(); -#endif - - return ret; + return CGame::InitialiseRenderWare(); } POP_MEMID(); @@ -499,12 +491,6 @@ Initialise3D(void *param) static void Terminate3D(void) { -#ifdef SCREEN_DROPLETS - ScreenDroplets::Shutdown(); -#endif -#ifdef EXTENDED_PIPELINES - CustomPipes::CustomPipeShutdown(); -#endif CGame::ShutdownRenderWare(); #ifdef DEBUGMENU DebugMenuShutdown(); diff --git a/src/extras/custompipes_d3d9.cpp b/src/extras/custompipes_d3d9.cpp index 28bf65d6..277a487d 100644 --- a/src/extras/custompipes_d3d9.cpp +++ b/src/extras/custompipes_d3d9.cpp @@ -172,6 +172,9 @@ DestroyVehiclePipe(void) rw::d3d::destroyVertexShader(neoVehicle_VS); neoVehicle_VS = nil; + rw::d3d::destroyPixelShader(neoVehicle_PS); + neoVehicle_PS = nil; + ((rw::d3d9::ObjPipeline*)vehiclePipe)->destroy(); vehiclePipe = nil; } @@ -363,6 +366,12 @@ CreateGlossPipe(void) void DestroyGlossPipe(void) { + rw::d3d::destroyVertexShader(neoGloss_VS); + neoGloss_VS = nil; + + rw::d3d::destroyPixelShader(neoGloss_PS); + neoGloss_PS = nil; + ((rw::d3d9::ObjPipeline*)glossPipe)->destroy(); glossPipe = nil; } |