Our great sponsors
-
CppCoreGuidelines
The C++ Core Guidelines are a set of tried-and-true guidelines, rules, and best practices about coding in C++
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
If you want to get better acquainted with Vulkan, I suggest you convert this code to work with vulkan.hpp. Look up the samples that come with it, also check out Sascha Willems' samples ported to hpp. Consider using VMA, naive memory allocations are pretty bad in vulkan, OTOH there's plenty of more interesting things to deal with than manually suballocating memory blocks. Also, have a look at libraries like vpp, vk-bootstrap, and vookoo, those might also help make your code more concise, thus easier to read, and refactoring stuff to use them will help you understand what's going on.
Cleaning this up will definitely give you some useful insights into C++ programming. Wrap things into classes, use RAII, basically try following best practices. Cutting up huge blocks of Vulkan boilerplate into manageable chunks is a great exercise in refactoring and code organization. You're not going to one-up any proper game engine here, not on your first attempt anyway, so the journey is what matters here, not the destination.
While definitely not a showpiece for good practices, here's a little project I did a while ago in OpenGL: https://github.com/starcatter/Udacity-Capstone-Project
Related posts
- GPU Compute in the Browser at the Speed of Native: WebGPU Marching Cubes
- PicoGK is a compact and robust geometry kernel for Computational Engineering
- 3D and 2D: Testing out my cross-platform graphics engine
- Google's First Tensor Processing Unit: Architecture
- From scratch OpenGL and shaders with raw Xlib