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

Fix vertex attributes having incorrect state when restarting BGFX #3267

Closed kareemkermad closed 3 months ago

kareemkermad commented 3 months ago

I've been having some issues when restarting BGFX using bgfx::shutdown() and bgfx::init(). It seems that some vertex attributes are disabled when they shouldn't be. I think this is because the following static variables are not reset:

This change just resets these back to zero when initializing.