bkaradzic / bgfx

Cross-platform, graphics API agnostic, "Bring Your Own Engine/Framework" style rendering library.
https://bkaradzic.github.io/bgfx/overview.html
BSD 2-Clause "Simplified" License
14.59k stars 1.92k forks source link

Add a macro that allows not including STB's impl. #3318

Open kalmard0 opened 5 days ago

kalmard0 commented 5 days ago

This is useful for projects that want to use bgfx's imgui layer but supply their own STB implementation that would otherwise conflict with this one (due to them being global C functions).

bkaradzic commented 5 days ago

I dislike this approach, but understand what's the problem...

Also bgfx doesn't use #ifdef/#ifndef rather uses defines that are set to 0 or 1.

kalmard0 commented 5 days ago

I dislike this approach, but understand what's the problem...

Also bgfx doesn't use #ifdef/#ifndef rather uses defines that are set to 0 or 1.

Any suggestions on how to implement this nicely?

bkaradzic commented 5 days ago

Any suggestions on how to implement this nicely?

Not really right now. I would have to look at it to refresh my memory why it's done like that.