- `VK_ERROR_SURFACE_LOST_KHR` was caused by the sdl window being
dropped, it is now kept in gamestate to prevent that
- `VK_ERROR_OUT_OF_POOL_MEMORY` was caused by the descriptor pool having
a hardcodes size for the number of descriptor sets instead of that number
depending on the required number of sets
Note: We are still broken, a window opens and controls seem to work
fine, but nothing is shown in the window
- The state of the game is now tracked using a simple state
machine, where the main struct representing the game is `Game`
and its state a generic implementing `GameState` on that struct,
the following states exist:
- `Unstarted`: Nothing has been done yet
- `RenderAvailable`: The very basic things for rendering are available
(sdl context, entry, instance, device, cmdbuf, surface, etc)
- `LoadingWorld`: We are loading into a world, the only thing that
can be done here currently is add things to be rendered (Components)
of which only the `Cube` is available, with the skybox being
automaticall added.
- `InWorld`: We have loaded a world and can (theoretically) render things
and move about
- The render logic now lives in `render/` and is split both by phase, as well as
components and the swapchain having their own modules
- The input logic now lives in input and constits of one trait that should be
implemented for states that should handle input, and is currently capable of
handling mouse movenent, key presses and keys that should be held down (ex,
movement keys)
- The game logic lives in `game/` and is/will be responsible for driving both
the input and render modules
Note: the current commit is broken, as our surface is lost when returning from
`Game<Unstarted>::init_render`