renderer fixes wip
Looking bad, it is hard to tell what exactly was fixed here except the minimum render distance.
Ramblings about hobbyist game development
renderer fixes wip
Looking bad, it is hard to tell what exactly was fixed here except the minimum render distance.
– add descriptor sets for every model which contains the position + texture
– big refactoring so that we use this instead of trying to push this into many dynamic UBOs
– introduce many bleeding handles. fix this.
This rectifies a misunderstanding on my part of how to do things in Vulkan, which encourages an arbitrary number of descriptor sets as opposed to a bigger number of dynamic uniform buffer objects (UBOs). To this day (Septer 2019) I am unsure if this is the right way to go, since I am in no way an expert. 🙂
While this fixed the basic approach and got things working again, it also introduced the creation of a lot of Vulkan handles that weren’t properly freed again.
fix handle bleed
See the previous commit for more details.
– add dummy textures so that we can run the renderer before textures were loaded
– implement removing models (and their textures)
– keep track of the occurences of textures and do not overwrite them if they have the same id (do not bleed handles)
– attributes for certain function in the renderer (fix clion warnings)
Similar to the ModelManager, the TextureManager is also having the concept of dummy data to make sure to never crash, even if not fully initialised.
Furthermore it is now possible to fully remove models again, releasing the resources of models/textures if no instance of this type of model/texture no longer exists.
dynamic textures WiP
Not doing the gravity of the change justice, the commit messages hints at the fact that this adds the TextureManager, that similar to the ModelManager loads textures from the file system and caches them, so they will not get loaded multiple times unless necessary.
– finalise support for dyanmic uniform buffer support to update object locations
– do not query the family queue indices *every* time when creating a buffer
– try to find a physical device that supports exclusive transfer queues
This completes the dynamic uniform buffer support started in the previous commit. Furthermore OLives finally supports having models in arbitrary positions.
A small fix was made to let OLives run on computers with more than one GPU.
This also happens to be the first screenshot of OLives existing (taken from a video), this is supposed to showcase the new ability to have separate instances of a model in different positions.
– fix the order of the paramters when allocating the aligned memory (fix the resulting segfault)
– fix some clion warnings
This was really just a maintenance commit that, as mentioned, fixed a segfault that sometimes occurred as well as some style improvements suggested by the IDE.
– preliminary support for dynamic uniform buffers
– make the renderer support starting up without any meshes to render
In addition to the regular uniform buffers, this commit added dynamic uniform buffers to every model created on the renderer. These were later used for updating information specific to a model on a per-frame basis, such as rotation and position.
Furthermore this commit allowed OLives to start without any meshes loaded by injecting dummy data into the renderer until a proper mesh is loaded.
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.