I work with a large code base which uses PhysX for multiple isolated purposes within the same executable. The cost to upgrade from one version of PhysX to the next for this code base is very high. I would like to be able to take advantage of new features of PhysX in some areas of my code but in order to do so currently I'd need to upgrade the entire code base. My question/request is for there to be a viable upgrade path which does not require me to upgrade everything at once.
To be clear, obviously I can't have a single physics world partly simulated by 3.3.4 and partly by 4.1. What I want is to be able to have two unrelated worlds using different versions of PhysX linked into the same binary without violating the one definition rule.
One way to achieve this might be to put each version in its own namespace. I could apply this retroactively to my own fork of older versions but I'd like to not have to fork each new version to make this change. I suspect namespace aliases, possibly protected by compiler directives, could be used to keep the behavior as it is now for users that just want everything in the physx namespace but I haven't properly considered it.
I work with a large code base which uses PhysX for multiple isolated purposes within the same executable. The cost to upgrade from one version of PhysX to the next for this code base is very high. I would like to be able to take advantage of new features of PhysX in some areas of my code but in order to do so currently I'd need to upgrade the entire code base. My question/request is for there to be a viable upgrade path which does not require me to upgrade everything at once.
To be clear, obviously I can't have a single physics world partly simulated by 3.3.4 and partly by 4.1. What I want is to be able to have two unrelated worlds using different versions of PhysX linked into the same binary without violating the one definition rule.
One way to achieve this might be to put each version in its own namespace. I could apply this retroactively to my own fork of older versions but I'd like to not have to fork each new version to make this change. I suspect namespace aliases, possibly protected by compiler directives, could be used to keep the behavior as it is now for users that just want everything in the physx namespace but I haven't properly considered it.