widberg / bgfx.cmake

https://github.com/bkaradzic/bgfx.cmake. Independently maintained CMake build scripts for bgfx. Released under public domain.
https://github.com/bkaradzic/bgfx.cmake
Creative Commons Zero v1.0 Universal
286 stars 252 forks source link

Set OpenGL (ES) minimum version without force-disabling other renderers #74

Closed pezcode closed 4 years ago

pezcode commented 4 years ago

Setting BGFX_OPENGL_VERSION sets BGFX_CONFIG_RENDERER_OPENGL. The problem with this is that, while bgfx has logic for enabling the correct renderers depending on the host, enabling/disabling any renderer manually completely disables that logic.

The correct way to do this now is with BGFX_CONFIG_RENDERER_OPENGL_MIN_VERSION which doesn't affect the preprocessor logic.

I also added the same thing for OpenGL ES.