Skip to content

Commit 0b13eb9

Browse files
tytan652RytoEX
authored andcommitted
Replace Glad usage with newer libobs graphics API
1 parent 0fb70b6 commit 0b13eb9

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

cmake/os-linux.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ get_target_property(libdrm_include_directories Libdrm::Libdrm INTERFACE_INCLUDE_
44

55
target_include_directories(obs-browser PRIVATE ${libdrm_include_directories})
66

7-
target_link_libraries(obs-browser PRIVATE CEF::Wrapper CEF::Library X11::X11 OBS::glad)
7+
target_link_libraries(obs-browser PRIVATE CEF::Wrapper CEF::Library X11::X11)
88
set_target_properties(obs-browser PROPERTIES BUILD_RPATH "$ORIGIN/" INSTALL_RPATH "$ORIGIN/")
99

1010
target_sources(obs-browser PRIVATE drm-format.cpp drm-format.hpp)

obs-browser-plugin.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@
5656
#endif
5757

5858
#if !defined(_WIN32) && !defined(__APPLE__)
59-
#include <glad/glad.h>
6059
#include "drm-format.hpp"
6160
#endif
6261

@@ -717,10 +716,12 @@ static void check_hwaccel_support(void)
717716
const char *glVersion = NULL;
718717

719718
obs_enter_graphics();
720-
gladLoadGL();
721-
glVersion = (const char *)glGetString(GL_VERSION);
719+
glVersion = gs_get_driver_version();
722720
obs_leave_graphics();
723721

722+
if (!glVersion)
723+
return;
724+
724725
if (strstr(glVersion, "NVIDIA") != NULL) {
725726
hwaccel = false;
726727
blog(LOG_INFO,

0 commit comments

Comments
 (0)