Closed sandeep-datta closed 6 years ago
What would you suggest I replace the exceptions with? Return code handling everywhere?
I agree with you that cleanup could be handled better and should be called even in the case of exceptions, but I don't see any reason to drop the (very minimal) use of C++ features.
Return code handling everywhere?
Isn't Vulkan a C API? Do you not have to handle return codes anyway?
I don't see any reason to drop the (very minimal) use of C++ features.
Sure, no problem. I will close this issue.
Hi, please consider rewriting the tutorial using plain C (optionally with the use of C++ RAII) to keep the focus of the learner on Vulkan and away from C++ issues.
For example this code fragment from the Base Code chapter is not exception safe...
The call to cleanup() will be skipped if initVulkan() or mainLoop() throws an exception.
Exceptions are a C++ specific thing. It is just a distraction while learning Vulkan.