WyrmEngine is a project that is supposed to get me into vulkan and low level graphics in general so there are no current expectations to where this project will grow
WyrmEngine is a project that is supposed to get me into vulkan and low level graphics in general so there are no current expectations to where this project will grow
The square now has an image on it. This is done through texture images, or ktx(Khronos texture) format. An image view is also needed to describe how to access the image, and samplers apply filtering and transformations before presenting,
image used
Log in to leave a comment
I had to take a break because of school and stuff but I am back and the rectangle now inhibits a 3d view 🎉. To do this we need to share a model-view-matrix with the shader. This is done in Vulkan with the help of resource descriptors. A descriptor is a way for shaders to freely access resources like buffers and images.
Resources used:
Log in to leave a comment
I switched to VMA(https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/), so I don’t have to fiddle with memory allocation any more. It probably wouldn’t have taken this long if I didn’t have a skill issue and the implementation is probably wrong, but hey if it works it works
Log in to leave a comment
I know that at this point the pride triangle was a bit boring, so introducing the new and improved pride rectangle.
A few things have changed, g.e. I moved the renderer into a different class, implemented vertex buffers -> from now on you don’t have to specify the vertices inside the shader file, and I implemented the index buffer (no more duplicated vertices, see image below)
Log in to leave a comment
I refactored the code again so that the Vulkan structs use designated initialisation (see image below), and added const and constexpr where applicable.
Log in to leave a comment
rewrote the slang(shader) compilation in python instead of CMake because **** CMake
Log in to leave a comment
So I added implemented swap chain recreation. This makes everything scale properly when resizing the window at runtime.
Log in to leave a comment
So again nothing crazy - I just added an option to render multiple frames without needing to wait for each frame to be presented on the screen. This basically allows the host(essentially the CPU) to queue up more work while the device(GPU) is still processing previous frames, meaning less unnecessary idle time on the host. (This explanation is oversimplified and probably wrong, but I didn’t want to copy paste some graphics programming mumbo jumbo)
So for now I haven’t done anything crazy refactored the code and put the vulkan initialisation in its own file. Also just a heads up. If anyone is considering using vulkan, just use a library like vk-bootstrap(https://github.com/charles-lunarg/vk-bootstrap) so you don’t have to write 500+ lines of code just for initialisation.
Log in to leave a comment
Found it. Hopefully from now on I can be more consistent with devlogs
Log in to leave a comment
Took a like a dozen hours to get it to work but here we go, a window. Now where is that damn triangle.
Log in to leave a comment