-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GraphicsDeviceManager partial class refactor #4425
Conversation
FYI. I just put this up to test my progress. I still need to figure out how to abstract out |
I'm thinking of taking the mess of code in these methods and just putting them in some ".Legacy.cs" partial file. We can then structure a new path for new platforms and slowly bring the existing platforms over. Any other ideas? |
A temporary Legacy.cs sounds like an OK plan to move forward.
|
Ditto Legacy.cs sounds like the most reasonable approach. then we can move the code out slowly as things change. |
So sticking to the legacy file concept here, but I won't do any complex partial thing. Instead we have two copies of
Once we get all the platforms switched over the legacy implementation can be removed. Should have a new push here shortly with these changes. |
i'm having a look at making an abstract device manager with the common parts and a concrete class with the specifics for each platform. |
We preferably don't want to make abstract The path I've taken here allows for
Things are looking pretty good this way. |
@dellis1972 @KonajuGames - I could use feedback on this now. |
Looks ok to me. @KonajuGames ? |
Note this can wait until after 3.5. |
Going to merge this. It only affects Windows platforms at the moment. |
This PR is an attempt to clean and split up GraphicsDeviceManager to allow for partial class extension on new platforms.
GraphicsDeviceManager
toGraphicsDeviceManager.Legacy.cs
to maintain behavior of old platforms.GraphicsDeviceManager.cs
without any platform specific code in it.GraphicsDeviceManager
.Fixes #2859
Fixes #1762.
Once we switch over the OpenTK backed to support this then also #1748 should be fixed if it isn't already.