gboisse / gfx

A minimalist and easy to use graphics API.
MIT License
502 stars 36 forks source link

Split declarations and definitions into separate source files. #107

Closed maoliver-amd closed 8 months ago

maoliver-amd commented 8 months ago

This splits the definitions out of the header files and into their own source files. This improves compilation times by reducing the amount of code being included by every file that includes gfx. It can significantly improve compilation times when code is updated in gfx as it no longer triggers every file that includes gfx.h from being also recompiled. Nothing complicated was done when separating just the code previously wrapped in GFX_IMPLEMENTATION_DEFINE is now in a standalone file (straight cut and paste). To maintain backwards compatibility with header only builds of gfx the existing GFX_IMPLEMENTATION_DEFINE can still be used it just will now pull in the code from the separate cpp files.