From 6f742da52414ca02093a24fe5c0e1b9eb4402cd9 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Mon, 28 Nov 2022 07:43:46 +0100 Subject: [PATCH] plugin: Only initialize GLAD on OpenGL graphics backend --- source/plugin.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/plugin.cpp b/source/plugin.cpp index e888588..2eab5d0 100644 --- a/source/plugin.cpp +++ b/source/plugin.cpp @@ -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