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
merge some commits from the base of new_rendering, should fix problems with rendering on MacOS in master #6756
Conversation
4b3a27f
to
b653418
Compare
b653418
to
d338baa
Compare
This should now be passing all tests. (that Windows one is just failing to download something...) I added a renderer to the fake display used for the boost unit tests. It seems to work fine. It's rendering to an offscreen texture, so theoretically it might even be able to render things for tests, if that's ever useful / relevant. The WML validation tests are still using a headless setup with no renderer (which i think is what you get if you run wesnoth with --nogui). I got this working just by sprinkling some extra checks around, so things don't try to draw in headless mode. I'll probably rebase and merge this along with #6760 tomorrow, assuming there are no objections. |
Many places are not completely converted, but rather just converting a surface to a texture on the fly. This is likely to be very bad for performance. However they can now be addressed one by one.
This removes drawingSurface, and the compatibility shims blit_surface() and render_low_res() entirely. All draws should now use the new drawing interface in draw.cpp, primarily draw::blit(). There are still things reading pixels back from the screen. These should be phased out, but the interface will remain for screenshots and the like.
They silently do nothing in this case.
It was (a) spitting warnings, (b) deserving to do so because it was relying on undefined behaviour, and (c) doing nothing that the check directly above it hadn't just done.
Display no longer tries to draw or make buttons when it doesn't have a screen, and the request for an empty theme name is treated as a request for the default theme.
d338baa
to
072c22f
Compare
This is to address some bugs preventing the game from working on MacOS, raised on Discord.
It removes the fake compatibility framebuffer that was being used to maintain old code that expected to be able to draw directly to the screen. However it does so in a way that is likely to be very bad for performance. Or rather, the subsequent commits that bring performance back into line haven't been pulled in to this PR.
It needs some brief testing from someone with a less fast system than i have. Previously there were reports of slowness in the editor, but i don't experience it. Two things might cause slowness: scrolling around a large map in game, and scrolling the tool pallete in the map editor. If these are acceptable, then this should be merged.
Actually that editor issue might also be in current master... i'm not sure. It seems fine to me.
Most of this is converting things that used to use
SDL_Surface
to useSDL_Texture
in stead.There are several "TODO" comments added. Most of these are already resolved in the
new_rendering
branch.