diff options
Diffstat (limited to 'src/osd/modules/render/bgfx/shadermanager.cpp')
-rw-r--r-- | src/osd/modules/render/bgfx/shadermanager.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/osd/modules/render/bgfx/shadermanager.cpp b/src/osd/modules/render/bgfx/shadermanager.cpp index 763a744e4aa..282029cb96a 100644 --- a/src/osd/modules/render/bgfx/shadermanager.cpp +++ b/src/osd/modules/render/bgfx/shadermanager.cpp @@ -83,6 +83,15 @@ std::string shader_manager::make_path_string(const osd_options &options, const s { std::string shader_path(options.bgfx_path()); shader_path += PATH_SEPARATOR "shaders" PATH_SEPARATOR; + +#if defined(SDLMAME_EMSCRIPTEN) + // Hard-code renderer type to OpenGL ES for emscripten builds since the + // bgfx::getRendererType() is called here before BGFX has been + // initialized and therefore gives the wrong renderer type (Noop). + shader_path += "essl" PATH_SEPARATOR; + return shader_path; +#endif + switch (bgfx::getRendererType()) { case bgfx::RendererType::Noop: |