Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Survey map fixes #2797

Merged
merged 1 commit into from
Sep 22, 2021
Merged

Survey map fixes #2797

merged 1 commit into from
Sep 22, 2021

Conversation

tritonas00
Copy link
Collaborator

@tritonas00 tritonas00 commented Sep 21, 2021

Fixes #2767

For some reason when texture filtering is set to Bilinear, with some gpus, ImGui::GetIO().DisplaySize.y returns 0
Old code was: https://github.com/RigsOfRods/rigs-of-rods/blob/2020.01/source/main/terrain/map/SurveyMapManager.cpp#L185

Also fixes darker image in Big map with Anisotropic filtering

Before:
bef
After:
after

@paroj any idea why those nasty things happen? 🤣

@ohlidalp
Copy link
Member

@paroj I think this problem may affect Ogre as well since our imgui integration is a port of imgui-overlay from Ogre 1.12

This is where we fill DisplaySize:

// Setup display size (every frame to accommodate for window resizing)
io.DisplaySize = ImVec2(oMgr.getViewportWidth(), oMgr.getViewportHeight());

Ogre 13's code is equivalent: https://github.com/OGRECave/ogre/blob/493578624d6cf5513983b1df49fa945dd9cee26f/Components/Overlay/src/OgreImGuiOverlay.cpp#L146-L147

@paroj
Copy link
Contributor

paroj commented Sep 22, 2021

but the NewFrame() signature and calling convention changed upstream

@tritonas00 tritonas00 merged commit c9fc241 into RigsOfRods:master Sep 22, 2021
@tritonas00 tritonas00 deleted the survey-fix branch September 22, 2021 20:44
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tab map rendering black under "Bilinear" texture filtering.
3 participants