-
Notifications
You must be signed in to change notification settings - Fork 30
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
Fix OpenGL resizing #95
Conversation
Fixed everything turning black with Almost tricked myself that it wasn't working because I kept rebuilding for x64 when the games I were trying it on are x86... 🤕 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Looks clean and consistent now. We can merge into main after a rebase.
On an unrelated note, I just noticed that IMGUI_RENDER
is an Option<T>
instead of OnceCell
-- I might want to change that to be more consistent across the board and to not accidentally run into concurrency issues (I'm not sure what could be some side effects of using one or the other, but I do know). Can't wait for this to land into stable and do a pass over all of the other renderers too.
c1a9adf
to
8856a12
Compare
Yup, noticed that. There are quite a few inconsistencies across the renderers and hooks, not that it is surprising, but definitely may be worth looking at more closely. Didn't even notice that OnceCell isn't thread-safe. |
Yeah, now that I have quite a bit of experience with renderers and hooks under my belt I want to do a full refactor of all of that code eventually, likely once we're able to have more confidence in
It's not a big deal for us since currently we either use that with immutable data structures or wrap |
This PR will fix ImGui not resetting & thus disappearing in some games when a resize, resolution change or ALT + TAB happens.
We have to compare resolution because some older games (like CS 1.6) don't trigger any window resize when it is in fullscreen and the user changes resolution.
We have to compare window rect because ALT + TAB'ing and changing from windowed to/from fullscreen doesn't always trigger resolution change.
The only issue I have noticed so far is that after a bunch of resizes it is possible that everything ImGui renders goes completely black. If you resize again it is possible that it disappears.
I assume there is something more needed for the reset on the OpenGL end - maybe
glClearColor
?