-
Notifications
You must be signed in to change notification settings - Fork 109
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
Tracking issue: new scaling system #239
Comments
The first commit to this branch sets up a new This has been applied to all OpenGL and WGPU supported consoles and is working well. It's actually slightly faster, too. You'll also notice that the second commit is being used to add a gutter. This only applies to simple consoles at the moment, and only in OpenGL mode. So the adventurer isn't quite centered properly, because the secondary console doesn't have gutters yet. I also haven't applied it to other renderers or the input chain yet. Not a bad proof-of-concept, and performance is good. |
…penGL and WebGPU. Input isn't done yet.
…dd gutters to constrain scaled font sizes to multiples of natural font size, avoiding distortion.
Hopefully the gif will work. The last patch:
|
…e this breaks wasm, will fix later.
…Check if their contents has changed (or a resize occurred). If they are identical, skip uploading the vertex/index buffers. Applies to WebGPU and both OpenGL paths.
Signing off for the day on this, but there's some solid progress. The bottom row not rendering issue appears to be fixed. Scaling windows works, and tries to pick reasonable sizes based on fonts to keep things looking decent. Added in an optimization (that probably doesn't really belong in this issue) to not update vertex/index buffers if a console hasn't changed between frames. On turn-based roguelikes, that's usually the case - so it saves quite a bit of cpu/gpu traffic. It remains to be seen if its worth the effort for real-time games. This appears to work with consoles that change their character buffer size rather than scaling - but work remains to be done. There are also issues to resolve with WASM builds. |
…screen scaler's available_* fields for size, giving smooth scaling.
Haha. I guess it had to happen eventually... it works great on my Mac in wgpu, and on Linux. DX12 on Windows has the issue! |
More research indicates that its the driver! https://github.com/gfx-rs/wgpu/wiki/Known-Driver-Issues#intel--directx-12 |
…he render surface, which turned out not to work on Metal.
…a gutter of 8px for win/mac and 0px for everything else.
Now working on compatibility testing with the Hands-on Rust code-base.
So I'll work on fixing that. |
…ands-on Rust dungeon_graphics example.
More compatibility:
So Hands-on Rust code now works with the latest builds. (I have to test that one first, since a large chunk of my livelihood comes from my book writing!) Moving on to the Roguelike Tutorial. The most recent chapter compiles and runs great. Thanks to the new scheduling system, it consumes only 1% of CPU while running (Windows), spiking higher when you take a turn. So I think this branch is good. :-) |
…enhancements. (#242) * #239: Use a consistent font scalar for all terminal types on both opengl and wgpu. * #239 - Proof of concept. Simple terminal on OpenGL supports gutters (output only at this point). * #239 - Apply same changes to sparse and fancy consoles, try to fix a winit path that broke the CI. * Oops - I'd made WebGPU the RLTK default. * Fix default terminal type for bracket-lib also * #239 - Simple/Sparse/Fancy consoles have working output gutters for OpenGL and WebGPU. Input isn't done yet. * #239 Constrain minimum window size to the natural size. Dynamically add gutters to constrain scaled font sizes to multiples of natural font size, avoiding distortion. * Oops - didn't mean to double the gutter size! * #239 - A Star Mouse example has working mouse control now. Pretty sure this breaks wasm, will fix later. * #239 - Forced resize event on start in wgpu, just like OpenGL - it helps ensure things are consistent. * #239 - Simple/Sparse consoles don't change much in turn-based games. Check if their contents has changed (or a resize occurred). If they are identical, skip uploading the vertex/index buffers. Applies to WebGPU and both OpenGL paths. * #239 - Scalable (auto-resize console rather than scale) now uses the screen scaler's available_* fields for size, giving smooth scaling. * #239 - Quick doc update. * #239 - OpenGL aspect ratio scaling working great. Resize is doing really odd things on wgpu. * Unbreak rendering on non-dx12 platforms. * #239 #241 Fixes screenshots. No longer require the COPY_SRC flag on the render surface, which turned out not to work on Metal. * #239 Move to a single default gutter function, conditionally compile a gutter of 8px for win/mac and 0px for everything else. * #239 - Unbreak WASM32 compilation. Still testing it. * #239 - Doc update, reminder that you have to use resolver=2 if you are using wgpu. * #239 - Fix console without background discard detection, fixing the Hands-on Rust dungeon_graphics example. * #239 - Remove println I left in by mistake.
Woot - the new scaling system and associated enhancements are merged. |
Now that its merged, closing the tracking issue. |
Making the next feature branch a scaling system. I'm hoping that this will resolve quite a few issues that have been reported, while not breaking the API (I'm not asking much, eh?). Since there's a lot of moving parts related to the two scaling systems (simply scaling consoles and growing/shrinking the terminal size dynamically), this deserves its own branch while the kinks are worked out.
Goals:
Developing will take place in the https://github.com/amethyst/bracket-lib/tree/scaling branch.
This directly affects the following issues:
#226 #220 #213 #178 #171
The text was updated successfully, but these errors were encountered: