Hacker News new | ask | show | jobs
by wott 3468 days ago
Oh, this kind of horror I've met lately has got a name? Well, I learned something today. Thanks ;-)
2 comments

Despite what the code may look like, they all have a very easy to use API. Take stb_image.h for example. Most people need just two functions, stbi_load(), which loads any supported image format to a byte array. And stbi_image_free(), which frees the data.

But if you need anything more than that it's all there. e.g. loading from memory, loading via callbacks, support for HDR images, support for custom allocators, preprocessor flags let you exclude code for unused image formats, etc etc

You can copy the functions into a .c file if it makes you feel better.