plugin: Only initialize GLAD on OpenGL graphics backend

This commit is contained in:
Michael Fabian 'Xaymar' Dirks 2022-11-28 07:43:46 +01:00
parent 2577622dbe
commit 6f742da524
1 changed files with 3 additions and 1 deletions

View File

@ -116,7 +116,9 @@ MODULE_EXPORT bool obs_module_load(void)
// Initialize GLAD (OpenGL)
{
streamfx::obs::gs::context gctx{};
_streamfx_gfx_opengl = streamfx::gfx::opengl::get();
if (gs_get_device_type() == GS_DEVICE_OPENGL) {
_streamfx_gfx_opengl = streamfx::gfx::opengl::get();
}
}
#ifdef ENABLE_NVIDIA_CUDA