-
-
Notifications
You must be signed in to change notification settings - Fork 84
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
Add a way to recreate a Window without invalidating the existing Object #199
Comments
Alternatively: Provide a create function similar to what SFML has on their window. |
Would graphic resources created prior to a window getting recreated still be valid? OGL context thinking sounds. |
After some investigation, yes, a graphics resource absolutely persists. This feature would ultimately be a minor tweak to allow the recreation of a window without invalidating the .NET object's pointer |
I see three-ish issues here:
While 1. is certainly true, given that you'd recreate the window only very rarely, I feel this negligible. SFML.Net's API design was deliberately chosen to not use any Weighing the problems against the design choice, I've come to the conclusion that, I don't want to change this for SFML.Net 2. It's not on a hot path, as such an allocation isn't critical and the inconvenience caused, can be circumvented with a simple function that can be called, so it's not the end of the world. For SFML 3 or 3.1 we plan to have functions that would allow you to change the state of a window (and potentially the style as well). At the point we could have those functions implemented in SFML.Net as well. |
Options to recreate a window while reusing the existing Object should be added. While the object on the native side will be changed, the new pointer should be plugged back into the same Window to avoid additional GC overhead or access violations when attempting to work with a Window after recreating it
The text was updated successfully, but these errors were encountered: