PathOfBuildingCommunity / PathOfBuilding-SimpleGraphic

Other
7 stars 21 forks source link

Evolve renderer backend and API surface #44

Closed zao closed 8 months ago

zao commented 8 months ago

This PR supersedes my PRs #40, #41 and #42 for fixing the window positioning logic, adding the DPI awareness feature flag and addressing some problems around zlib usage.

It also reintroduces screenshot functionality, changes how the render queue is represented to a more efficient storage layout and adds boilerplate macros to wrap the functions exposed to Lua in a manner that allows C++ RAII usage inside the handlers as long as LAssert is replaced by LExpect which unwinds the C++ stack correctly.

The API changes between Lua and C++ are additive, no changes are needed on the Lua side apart from documenting the new flags and augment the headless wrapper when they start being used. This PR notably doesn't include the "Mesh" and "At" family of draw commands as they are not set in stone yet.

My apologies up-front for the intermingled PR as the commits are interdependent, the individual commits however have fairly verbose commit messages.