OpenLoco icon indicating copy to clipboard operation
OpenLoco copied to clipboard

Option for hardware display

Open AaronVanGeffen opened this issue 4 years ago • 2 comments

Currently, OpenLoco uses a software renderer. This will most likely continue to be the case for a long time, as we still use the original Locomotion routines for painting in OpenLoco.

A hardware back-end is not just a performance advantage. Some software relies on it for to ease image capture, for instance (e.g. streaming purposes). It's also a requirement to do proper interpolated linear scaling (cf. #376). I therefore propose we add a hardware (pass-through) display option for the software renderer, in the same way OpenRCT2 provides.

This will require quite a bit of tinkering with SDL2 to get working, but in principle, not much knowledge of the OpenLoco codebase is required. I am therefore labelling this a 'good first issue'. Possible tasks include (in this order):

  • [ ] Implement an optional 'hardware display' SDL surface;
  • [ ] Add a checkbox to enable/disable this option to the Options window;
  • [ ] Make non-integer window scaling possible (linear interpolation using SDL)

Please contact us on our Discord server if you'd like to work on this.

For reference and inspiration, some relevant commits and PRs from OpenRCT2:

add hardware display Highdpi (#2280) Quality hinting (#2852) Smooth Nearest Neighbour (#6588)

AaronVanGeffen avatar Apr 19 '20 17:04 AaronVanGeffen

Hi I would like to contribute.

emirsoyturk avatar Mar 10 '22 12:03 emirsoyturk

@Volthai7us great. We are mostly on discord if you want to discuss anything. This issue might be on the harder side of the good first issues.

duncanspumpkin avatar Mar 11 '22 08:03 duncanspumpkin

@ZehMatt Would you mind taking this up?

AaronVanGeffen avatar May 16 '23 19:05 AaronVanGeffen