re: How to design API of a library for Vulkan? VIEW POST


Ah the joys of dependencies and plumbing things together!

I would work on decoupling your core feature(s) that provide actual value from the data flow plumbing and management needs (like memory) - possibly via dependency injection techniques (if you have a language that supports it), or maybe simple callbacks.

If there are standard types in use (and in Vulkan there probably are) you can sensibly expect to use those for data structuring, otherwise you will be inventing your own.

If you want to provide sample implementations (perhaps in a demo app) of the library dependencies, then your consumers have a choice to plumb in their own components or use yours.

code of conduct - report abuse