edubart / sokol_gp

Minimal modern efficient cross platform 2D graphics painter in C
MIT No Attribution
429 stars 23 forks source link

Use new Sokol logging mechanism #23

Open edubart opened 9 months ago

edubart commented 9 months ago

Sokol has a new style for logging stuff, would be nice if Sokol GP follows it.

kkukshtel commented 9 months ago

Does it currently route to the bound logger in the sg_desc? I'm binding the logging there to an external function so want to make sure I'm getting gp errors.

edubart commented 9 months ago

Does it currently route to the bound logger in the sg_desc? I'm binding the logging there to an external function so want to make sure I'm getting gp errors.

No, currently it follows the following logic:

#ifndef SOKOL_LOG
    #ifdef SOKOL_DEBUG
        #include <stdio.h>
        #define SOKOL_LOG(s) { SOKOL_ASSERT(s); puts(s); }
    #else
        #define SOKOL_LOG(s)
    #endif
#endif

But you can define SOKOL_LOG to override this behavior.