From 116ab9e56cf1e8dc372e9bfd6f3a0bef6bbe830c Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Thu, 24 Mar 2022 17:17:08 +0100 Subject: [PATCH] EGL --- CMakeLists.txt | 3 +++ src/Compositor.cpp | 8 ++++++++ src/Compositor.hpp | 1 + src/includes.hpp | 1 + 4 files changed, 13 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index c1d0cd76..49297a20 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,6 +37,9 @@ target_link_libraries(Hyprland PkgConfig::deps) target_link_libraries(Hyprland wlroots pixman-1 + OpenGL + GLESv2 + pthread ${CMAKE_THREAD_LIBS_INIT} ) diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 4826d502..eab48614 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -20,6 +20,7 @@ CCompositor::CCompositor() { const auto DRMFD = wlr_backend_get_drm_fd(m_sWLRBackend); if (DRMFD < 0) { Debug::log(CRIT, "Couldn't query the DRM FD!"); + RIP("DRMFD NULL!"); return; } @@ -41,6 +42,13 @@ CCompositor::CCompositor() { return; } + m_sWLREGL = wlr_gles2_renderer_get_egl(m_sWLRRenderer); + + if (!m_sWLREGL) { + Debug::log(CRIT, "m_sWLREGL was NULL!"); + RIP("m_sWLREGL NULL!"); + return; + } m_sWLRCompositor = wlr_compositor_create(m_sWLDisplay, m_sWLRRenderer); m_sWLRSubCompositor = wlr_subcompositor_create(m_sWLDisplay); diff --git a/src/Compositor.hpp b/src/Compositor.hpp index 6f1c9ed6..fad078b4 100644 --- a/src/Compositor.hpp +++ b/src/Compositor.hpp @@ -45,6 +45,7 @@ public: wlr_scene* m_sWLRScene; wlr_input_inhibit_manager* m_sWLRInhibitMgr; wlr_keyboard_shortcuts_inhibit_manager_v1* m_sWLRKbShInhibitMgr; + wlr_egl* m_sWLREGL; // ------------------------------------------------- // diff --git a/src/includes.hpp b/src/includes.hpp index 8d52078b..6b8c723b 100644 --- a/src/includes.hpp +++ b/src/includes.hpp @@ -75,6 +75,7 @@ extern "C" { #include #include #include +#include } #undef class