make scrolling work with proper camera rotation
Rotating the view and then initiating scrolling caused some weird behaviour, this commit fixed the underlying view matrix calculation.
Ramblings about hobbyist game development
make scrolling work with proper camera rotation
Rotating the view and then initiating scrolling caused some weird behaviour, this commit fixed the underlying view matrix calculation.
make the project compile with a more recent vulkanhpp version. actually read vertex and index dimensions from the model manager
This one was not a lot of fun, a newer version of vulkanhpp, the C++ wrapper around the native C Vulkan API, was released and introduced a few changes. A lack of user-friendly documentation made the switch more painful than first expected.
On a more positive note, the model data was now fully loaded from the ModelManager and dynamic.
fix build and move the used vertex data to the modelmanager. still completely temporary as the renderer is just using hardcoded indices
Finally the ModelManager is used to load and show vertex data by the renderer, as opposed to the hardocded path (and loading/decoding logic) that was used before.
fix build by (besides wanted fixes) remove move semantics for now
As mentioned in the previous commit, this mainly fixes the build by removing C++14 move semantics in some cases. Lack of deeper knowledge of the new C++14 features can be blamed here.
add the first part of the WiP model concept, currently broken
This introduces the ModelManager, a class that can load arbitrary models as well as caching data about already loaded models, so requesting the same model twice will not result in the same model being loaded more than once.
In this state the code was already added, but broke the build, also even if it worked, it would have been unused by the renderer, which was still using hardcoded model references.
implement the first iteration of the logger
This introduces the logger, the main features are different logging levels (Normal, Error and Debug) as well as automatic logging into stdout/stderr respectively as well as into a main logging file (olives.log) for the Normal/Debug messages and an error file (olives.err.log) for the Error type log entries. Using it looks something like this:
std::string message = “Renderer: Could not create logical device”;
logger->logError(message);
throw std::runtime_error(message);
even more consts
See the previous commit. 🙂
add some consts
As OLives is written in C++, go figure. This is more or less just peppering the code with consts.
implement mouse triggered scrolling
This greatly fleshes out the glfw based input handling and adds mouse based scrolling to the keyboard scrolling.
The basic idea here is to consider the outer 15% of the current viewport as scrolling trigger areas and use the same behaviour as if the user were pressing the cursors case in the selected direction.
implement keyboard scrolling (somewhat rough feeling, good enough for now)
Similar to the previous commit this also implements scrolling, not just rotation. Also, once again inspired by the rotation, it will accelerate/decelerate the movement instead of just having a constant speed.