RigsOfRods / rigs-of-rods

Main development repository for Rigs of Rods soft-body physics simulator
https://www.rigsofrods.org
GNU General Public License v3.0
1.03k stars 178 forks source link

PROOF OF CONCEPT: reinit rendering after conf change #3167

Closed ohlidalp closed 3 months ago

ohlidalp commented 4 months ago

When you go to {Main Menu / Game Settings / Render System} and change resolution, the game will immediatelly reopen the rendering window, load all resources (they become invalid) and start rendering again with the new settings.

Only works smoothly if you start game, do the change and then exit game. Entering simulation before/after causes crashes, hangs and other weird stuff.

I had to duplicate most of our startup code to get this to work, RoR wasn't written with renderer reinit in mind.

ohlidalp commented 3 months ago

Closing as the code is not viable for merging - but the test is a success.