diff --git a/README.md b/README.md index 7f3a8d7..7e34b70 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ In `xdg-shell-protocol.cpp` - we need access to `xdg_wm_base_interface` so expor #### 3D Rendering ```bash -sudo apt-get install libgl-dev +sudo apt-get install libgl-dev libegl1-mesa-dev ``` #### fonts diff --git a/src/client/GuiApplication.cpp b/src/client/GuiApplication.cpp index 87739c7..4252e27 100644 --- a/src/client/GuiApplication.cpp +++ b/src/client/GuiApplication.cpp @@ -84,13 +84,13 @@ void GuiApplication::Run() #ifdef __linux__ mDesktopManager->SetKeyboard(XcbKeyboard::Create()); - bool useOpenGl = false; + bool useHardwareRendering = false; XcbInterface window_interface; - window_interface.SetUseOpenGl(useOpenGl); + window_interface.setUseHardwareRendering(useHardwareRendering); window_interface.initialize(mDesktopManager.get()); window_interface.addWindow(mainWindow, mDesktopManager.get()); window_interface.showWindow(mainWindow); - if (useOpenGl) + if (useHardwareRendering) { window_interface.CreateOpenGlDrawable(mainWindow); } diff --git a/src/graphics/CMakeLists.txt b/src/graphics/CMakeLists.txt index 1ba5fe5..513296c 100644 --- a/src/graphics/CMakeLists.txt +++ b/src/graphics/CMakeLists.txt @@ -18,6 +18,7 @@ list(APPEND graphics_HEADERS INativeDrawingContext.h ) +set(OpenGL_GL_PREFERENCE "GLVND") find_package(OpenGL QUIET) if (OpenGL_FOUND) list(APPEND platform_LIBS OpenGL::GL) diff --git a/src/windows/CMakeLists.txt b/src/windows/CMakeLists.txt index 2a25282..ec6a105 100644 --- a/src/windows/CMakeLists.txt +++ b/src/windows/CMakeLists.txt @@ -40,8 +40,16 @@ if(UNIX) ui_interfaces/wayland/WaylandPointerInterface.cpp ui_interfaces/wayland/WaylandSeatInterface.cpp ui_interfaces/wayland/WaylandKeyboard.cpp + ui_interfaces/wayland/WaylandEglInterface.cpp + ui_interfaces/wayland/WaylandEglWindowInterface.cpp ${WAYLAND_EXTENSIONS_INCLUDE_DIR}/xdg-shell-protocol.cpp ) + set(OpenGL_GL_PREFERENCE "GLVND") + find_package(OpenGL QUIET) + if (OpenGL_FOUND) + list(APPEND platform_LIBS OpenGL::EGL) + endif() + set(_HAS_WAYLAND ON) #else() #message(STATUS "Wayland Extensions Header not found - not building Wayland support") @@ -87,7 +95,7 @@ target_include_directories(windows PUBLIC ${X11_INCLUDE_DIRS} ) -target_link_libraries(windows PUBLIC ${platform_LIBS} core geometry graphics ui_elements ${WAYLAND_CLIENT_LIBRARY}) +target_link_libraries(windows PUBLIC ${platform_LIBS} core geometry graphics ui_elements ${WAYLAND_CLIENT_LIBRARY} wayland-egl) target_compile_options(windows PRIVATE -Wno-attributes) # From xdg shell autogen code set_property(TARGET windows PROPERTY FOLDER src) diff --git a/src/windows/ui_interfaces/AbstractUiInterface.h b/src/windows/ui_interfaces/AbstractUiInterface.h index 4a99534..79a6488 100644 --- a/src/windows/ui_interfaces/AbstractUiInterface.h +++ b/src/windows/ui_interfaces/AbstractUiInterface.h @@ -20,4 +20,12 @@ public: virtual void showWindow(mt::Window* window) = 0; virtual void addWindow(mt::Window* window, DesktopManager* desktopManager) = 0; + + void setUseHardwareRendering(bool useHardware) + { + mUseHardwareRendering = useHardware; + } + +protected: + bool mUseHardwareRendering{false}; }; diff --git a/src/windows/ui_interfaces/wayland/WaylandEglInterface.cpp b/src/windows/ui_interfaces/wayland/WaylandEglInterface.cpp new file mode 100644 index 0000000..e69de29 diff --git a/src/windows/ui_interfaces/wayland/WaylandEglInterface.h b/src/windows/ui_interfaces/wayland/WaylandEglInterface.h new file mode 100644 index 0000000..c0d0285 --- /dev/null +++ b/src/windows/ui_interfaces/wayland/WaylandEglInterface.h @@ -0,0 +1,89 @@ +#pragma once + +#include +#include +#include + +class WaylandEglInterface +{ +public: + + void initialize(wl_display* display) + { + mEglDisplay = eglGetDisplay((EGLNativeDisplayType) display); + if (mEglDisplay == EGL_NO_DISPLAY) + { + fprintf(stderr, "Can't create egl display\n"); + return; + } + else + { + fprintf(stderr, "Created egl display\n"); + } + + EGLint major{0}; + EGLint minor{0}; + if (eglInitialize(mEglDisplay, &major, &minor) != EGL_TRUE) + { + fprintf(stderr, "Can't initialise egl display\n"); + return; + } + printf("EGL major: %d, minor %d\n", major, minor); + + EGLint count{0}; + eglGetConfigs(mEglDisplay, nullptr, 0, &count); + printf("EGL has %d configs\n", count); + + EGLConfig* configs; + configs = static_cast(calloc(count, sizeof* configs)); + + EGLint n{0}; + EGLint config_attribs[] = { + EGL_SURFACE_TYPE, EGL_WINDOW_BIT, + EGL_RED_SIZE, 8, + EGL_GREEN_SIZE, 8, + EGL_BLUE_SIZE, 8, + EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, + EGL_NONE + }; + eglChooseConfig(mEglDisplay, config_attribs, configs, count, &n); + EGLint size{0}; + for (int i = 0; i < n; i++) + { + eglGetConfigAttrib(mEglDisplay, configs[i], EGL_BUFFER_SIZE, &size); + printf("Buffer size for config %d is %d\n", i, size); + eglGetConfigAttrib(mEglDisplay, configs[i], EGL_RED_SIZE, &size); + printf("Red size for config %d is %d\n", i, size); + + // just choose the first one + mEglConfig = configs[i]; + break; + } + + static const EGLint context_attribs[] = { + EGL_CONTEXT_CLIENT_VERSION, 2, + EGL_NONE + }; + mEglContext = eglCreateContext(mEglDisplay, mEglConfig, EGL_NO_CONTEXT, context_attribs); + } + + EGLDisplay getDisplay() const + { + return mEglDisplay; + } + + EGLConfig getConfig() const + { + return mEglConfig; + } + + EGLContext getContext() const + { + return mEglContext; + } + +private: + EGLDisplay mEglDisplay; + EGLConfig mEglConfig; + EGLContext mEglContext; +}; diff --git a/src/windows/ui_interfaces/wayland/WaylandEglWindowInterface.cpp b/src/windows/ui_interfaces/wayland/WaylandEglWindowInterface.cpp new file mode 100644 index 0000000..e69de29 diff --git a/src/windows/ui_interfaces/wayland/WaylandEglWindowInterface.h b/src/windows/ui_interfaces/wayland/WaylandEglWindowInterface.h new file mode 100644 index 0000000..df9c869 --- /dev/null +++ b/src/windows/ui_interfaces/wayland/WaylandEglWindowInterface.h @@ -0,0 +1,108 @@ +#pragma once + +#include "WaylandEglInterface.h" + +#include +#include +#include + +class WaylandEglWindowInterface +{ +public: + + WaylandEglWindowInterface(WaylandEglInterface* eglInterface) + : mEglInterface(eglInterface) + { + + } + + void initialize(wl_surface* surface, int width, int height) + { + if (mEglSurface) + { + return; + } + + mEglWindow = wl_egl_window_create(surface, width, height); + if (mEglWindow == EGL_NO_SURFACE) + { + fprintf(stderr, "Can't create egl window\n"); + return; + } + else + { + fprintf(stderr, "Created egl window\n"); + } + + mEglSurface = eglCreateWindowSurface(mEglInterface->getDisplay(), mEglInterface->getConfig(), mEglWindow, nullptr); + + if (!mEglSurface) + { + switch(eglGetError()) + { + //case EGL_NO_SURFACE: + //fprintf(stderr, "EGL_NO_SURFACE\n"); + //break; + case EGL_BAD_DISPLAY: + fprintf(stderr, "EGL_BAD_DISPLAY\n"); + break; + case EGL_NOT_INITIALIZED: + fprintf(stderr, "EGL_NOT_INITIALIZED\n"); + break; + case EGL_BAD_CONFIG: + fprintf(stderr, "EGL_BAD_CONFIG\n"); + break; + case EGL_BAD_NATIVE_WINDOW: + fprintf(stderr, "EGL_BAD_NATIVE_WINDOW\n"); + break; + case EGL_BAD_ATTRIBUTE: + fprintf(stderr, "EGL_BAD_ATTRIBUTE\n"); + break; + case EGL_BAD_ALLOC: + fprintf(stderr, "EGL_BAD_ALLOC\n"); + break; + case EGL_BAD_MATCH: + fprintf(stderr, "EGL_BAD_MATCH\n"); + break; + default: + fprintf(stderr, "Unknown EGL error\n"); + } + + fprintf(stderr, "Created surface failed\n"); + } + + } + + void draw() + { + if (!mEglSurface) + { + return; + } + + if (eglMakeCurrent(mEglInterface->getDisplay(), mEglSurface, mEglSurface, mEglInterface->getContext())) + { + fprintf(stderr, "Made current\n"); + } + else { + fprintf(stderr, "Made current failed\n"); + } + + glClearColor(1.0, 1.0, 0.0, 1.0); + glClear(GL_COLOR_BUFFER_BIT); + glFlush(); + + if (eglSwapBuffers(mEglInterface->getDisplay(), mEglSurface)) + { + fprintf(stderr, "Swapped buffers\n"); + } + else { + fprintf(stderr, "Swapped buffers failed\n"); + } + } + +private: + wl_egl_window* mEglWindow{nullptr}; + EGLSurface mEglSurface; + WaylandEglInterface* mEglInterface; +}; diff --git a/src/windows/ui_interfaces/wayland/WaylandKeyboard.cpp b/src/windows/ui_interfaces/wayland/WaylandKeyboard.cpp index b18ec62..95a6e49 100644 --- a/src/windows/ui_interfaces/wayland/WaylandKeyboard.cpp +++ b/src/windows/ui_interfaces/wayland/WaylandKeyboard.cpp @@ -25,7 +25,7 @@ void WaylandKeyboard::keyboardPressedEvent(void *data, struct wl_keyboard *wl_ke static void wl_keyboard_leave(void *data, struct wl_keyboard *wl_keyboard, uint32_t serial, struct wl_surface *surface) { - fprintf(stderr, "keyboard leave\n"); + } static void wl_keyboard_repeat_info(void *data, struct wl_keyboard *wl_keyboard, int32_t rate, int32_t delay) @@ -46,8 +46,6 @@ void WaylandKeyboard::onKeyboardModifier(uint32_t mods_depressed, uint32_t mods_ void WaylandKeyboard::onEnterEvent(struct wl_array *keys) { - MLOG_INFO("keyboard enter; keys pressed are:"); - void* key; wl_array_for_each(key, keys) { @@ -56,9 +54,9 @@ void WaylandKeyboard::onEnterEvent(struct wl_array *keys) char buf[128]; xkb_keysym_t sym = xkb_state_key_get_one_sym(mXkbState, *key_type + 8); xkb_keysym_get_name(sym, buf, sizeof(buf)); - fprintf(stderr, "sym: %-12s (%d), ", buf, sym); + //fprintf(stderr, "sym: %-12s (%d), ", buf, sym); xkb_state_key_get_utf8(mXkbState, *key_type + 8, buf, sizeof(buf)); - fprintf(stderr, "utf8: '%s'\n", buf); + //fprintf(stderr, "utf8: '%s'\n", buf); } } @@ -69,9 +67,9 @@ void WaylandKeyboard::onPressedEvent(uint32_t key, uint32_t state) xkb_keysym_t sym = xkb_state_key_get_one_sym(mXkbState, keycode); xkb_keysym_get_name(sym, buf, sizeof(buf)); const char *action = state == WL_KEYBOARD_KEY_STATE_PRESSED ? "press" : "release"; - fprintf(stderr, "key %s: sym: %-12s (%d), ", action, buf, sym); + //fprintf(stderr, "key %s: sym: %-12s (%d), ", action, buf, sym); xkb_state_key_get_utf8(mXkbState, keycode, buf, sizeof(buf)); - fprintf(stderr, "utf8: '%s'\n", buf); + //fprintf(stderr, "utf8: '%s'\n", buf); } void WaylandKeyboard::onKeymapEvent(struct wl_keyboard *wl_keyboard, uint32_t format, int32_t fd, uint32_t size) diff --git a/src/windows/ui_interfaces/wayland/WaylandPointerInterface.cpp b/src/windows/ui_interfaces/wayland/WaylandPointerInterface.cpp index a0ca2e1..6cebe57 100644 --- a/src/windows/ui_interfaces/wayland/WaylandPointerInterface.cpp +++ b/src/windows/ui_interfaces/wayland/WaylandPointerInterface.cpp @@ -63,11 +63,10 @@ void WaylandPointerInterface::onPointerFrame() { const auto locx = wl_fixed_to_double(mWorkingPointerEvent.surface_x); const auto locy = wl_fixed_to_double(mWorkingPointerEvent.surface_y); - MLOG_INFO("Enter at " << locx << " , " << locy); } else if (mWorkingPointerEvent.event_mask & POINTER_EVENT_LEAVE) { - MLOG_INFO("Leave);") + } else if (mWorkingPointerEvent.event_mask & POINTER_EVENT_MOTION) { @@ -76,7 +75,6 @@ void WaylandPointerInterface::onPointerFrame() else if (mWorkingPointerEvent.event_mask & POINTER_EVENT_BUTTON) { const bool released = mWorkingPointerEvent.state == WL_POINTER_BUTTON_STATE_RELEASED; - MLOG_INFO("Mouse button" << released ? "released" : "pressed"); } mWorkingPointerEvent = WaylandPointerEvent(); } diff --git a/src/windows/ui_interfaces/wayland/WaylandSurface.cpp b/src/windows/ui_interfaces/wayland/WaylandSurface.cpp index 46b47e3..ff899ca 100644 --- a/src/windows/ui_interfaces/wayland/WaylandSurface.cpp +++ b/src/windows/ui_interfaces/wayland/WaylandSurface.cpp @@ -1,5 +1,7 @@ #include "WaylandSurface.h" +#include "WaylandEglWindowInterface.h" + WaylandSurface::WaylandSurface(mt::Window* window) : mWindow(window) { @@ -11,9 +13,13 @@ WaylandSurface::~WaylandSurface() } -void WaylandSurface::initialize(wl_compositor* compositor, xdg_wm_base* xdg_wm_base, std::shared_ptr buffer) +void WaylandSurface::initialize(wl_compositor* compositor, xdg_wm_base* xdg_wm_base, std::shared_ptr buffer, WaylandEglInterface* eglInterface) { mBuffer = buffer; + if (eglInterface) + { + mEglWindowInterface = std::make_unique(eglInterface); + } mSurface = wl_compositor_create_surface(compositor); mXdgSurface = xdg_wm_base_get_xdg_surface(xdg_wm_base, mSurface); @@ -31,16 +37,28 @@ void WaylandSurface::initialize(wl_compositor* compositor, xdg_wm_base* xdg_wm_b xdg_toplevel_set_title(mXdgTopLevel, "Example client"); wl_surface_commit(mSurface); + + auto region = wl_compositor_create_region(compositor); + wl_region_add(region, 0, 0, mWindow->GetWidth(), mWindow->GetHeight()); + wl_surface_set_opaque_region(mSurface, region); } void WaylandSurface::onConfigure(xdg_surface *xdg_surface, uint32_t serial) { xdg_surface_ack_configure(xdg_surface, serial); - auto buffer = drawFrame(); - wl_surface_attach(mSurface, buffer, 0, 0); - //wl_surface_damage(mSurface, 0, 0, UINT32_MAX, UINT32_MAX); - wl_surface_commit(mSurface); + if (mEglWindowInterface) + { + mEglWindowInterface->initialize(mSurface, mWindow->GetWidth(), mWindow->GetHeight()); + mEglWindowInterface->draw(); + } + else + { + auto buffer = drawFrame(); + wl_surface_attach(mSurface, buffer, 0, 0); + //wl_surface_damage(mSurface, 0, 0, UINT32_MAX, UINT32_MAX); + wl_surface_commit(mSurface); + } } wl_buffer* WaylandSurface::drawFrame() diff --git a/src/windows/ui_interfaces/wayland/WaylandSurface.h b/src/windows/ui_interfaces/wayland/WaylandSurface.h index 71ca1f1..558342b 100644 --- a/src/windows/ui_interfaces/wayland/WaylandSurface.h +++ b/src/windows/ui_interfaces/wayland/WaylandSurface.h @@ -5,12 +5,15 @@ #include "Window.h" #include "SharedMemory.h" -#include +#include "WaylandBuffer.h" struct wl_surface; struct xdg_surface; struct xdg_toplevel; +class WaylandEglInterface; +class WaylandEglWindowInterface; + class WaylandSurface { @@ -19,7 +22,7 @@ public: ~WaylandSurface(); - void initialize(wl_compositor* compositor, xdg_wm_base* xdg_wm_base, std::shared_ptr buffer); + void initialize(wl_compositor* compositor, xdg_wm_base* xdg_wm_base, std::shared_ptr buffer, WaylandEglInterface* eglInterface); void onConfigure(xdg_surface *xdg_surface, uint32_t serial); @@ -37,6 +40,7 @@ private: xdg_toplevel* mXdgTopLevel{nullptr}; std::shared_ptr mBuffer; + std::unique_ptr mEglWindowInterface{nullptr}; }; using WaylandSurfacePtr = std::unique_ptr; diff --git a/src/windows/ui_interfaces/wayland/WaylandWindowInterface.cpp b/src/windows/ui_interfaces/wayland/WaylandWindowInterface.cpp index a8f5631..dba3a87 100644 --- a/src/windows/ui_interfaces/wayland/WaylandWindowInterface.cpp +++ b/src/windows/ui_interfaces/wayland/WaylandWindowInterface.cpp @@ -4,6 +4,7 @@ #include "WaylandSurface.h" #include "WaylandBuffer.h" #include "WaylandSeatInterface.h" +#include "WaylandEglInterface.h" #include #include @@ -72,6 +73,12 @@ void WaylandWindowInterface::initialize(DesktopManager* desktopManager) wl_registry_add_listener(registry, &mRegistryListener, this); wl_display_roundtrip(mDisplay); + + if (mUseHardwareRendering) + { + mEglInterface = std::make_unique(); + mEglInterface->initialize(mDisplay); + } } void WaylandWindowInterface::setSeat(wl_seat* seat) @@ -119,7 +126,7 @@ void WaylandWindowInterface::showWindow(mt::Window* window) return; } - mSurfaces[0]->initialize(mCompositor, mXdgBase, mBuffer); + mSurfaces[0]->initialize(mCompositor, mXdgBase, mBuffer, mEglInterface.get()); } void WaylandWindowInterface::shutDown() diff --git a/src/windows/ui_interfaces/wayland/WaylandWindowInterface.h b/src/windows/ui_interfaces/wayland/WaylandWindowInterface.h index 1b8cafb..c58ddbd 100644 --- a/src/windows/ui_interfaces/wayland/WaylandWindowInterface.h +++ b/src/windows/ui_interfaces/wayland/WaylandWindowInterface.h @@ -13,6 +13,7 @@ class WaylandSurface; class WaylandBuffer; class WaylandSeatInterface; +class WaylandEglInterface; class WaylandWindowInterface : public AbstractUIInterface { @@ -56,4 +57,5 @@ private: std::vector > mSurfaces; std::shared_ptr mBuffer; std::unique_ptr mSeatInterface; + std::unique_ptr mEglInterface; }; diff --git a/src/windows/ui_interfaces/x11/XcbInterface.cpp b/src/windows/ui_interfaces/x11/XcbInterface.cpp index be4f1e7..82b9373 100644 --- a/src/windows/ui_interfaces/x11/XcbInterface.cpp +++ b/src/windows/ui_interfaces/x11/XcbInterface.cpp @@ -21,12 +21,11 @@ XcbInterface::XcbInterface() - : mUseOpenGl(true), - mConnection(nullptr), - mX11Display(), - mGlxInterface(), - mXcbEventInterface(XcbEventInterface::Create()), - mXcbWindowInterface(XcbWindowInterface::Create()) + : mConnection(nullptr), + mX11Display(), + mGlxInterface(), + mXcbEventInterface(XcbEventInterface::Create()), + mXcbWindowInterface(XcbWindowInterface::Create()) { } @@ -36,17 +35,12 @@ XcbInterface::~XcbInterface() } -void XcbInterface::SetUseOpenGl(bool use) -{ - mUseOpenGl = use; -} - void XcbInterface::initialize(DesktopManager* desktopManager) { Connect(); UpdateScreen(desktopManager); CreateGraphicsContext(desktopManager); - if (mUseOpenGl) + if (mUseHardwareRendering) { InitializeOpenGl(); } @@ -54,7 +48,7 @@ void XcbInterface::initialize(DesktopManager* desktopManager) void XcbInterface::Connect() { - if (mUseOpenGl) + if (mUseHardwareRendering) { mX11Display = XOpenDisplay(0); if (!mX11Display) @@ -84,7 +78,7 @@ void XcbInterface::UpdateScreen(DesktopManager* desktopManager) return; } auto screen_iter = xcb_setup_roots_iterator(xcb_get_setup(mConnection)); - if (mUseOpenGl) + if (mUseHardwareRendering) { if (!mX11Display) { @@ -109,7 +103,7 @@ void XcbInterface::InitializeOpenGl() void XcbInterface::CreateOpenGlDrawable(mt::Window* window) { - if (!mUseOpenGl or !window or !window->GetPlatformWindow()) + if (!mUseHardwareRendering or !window or !window->GetPlatformWindow()) { return; } @@ -181,7 +175,7 @@ void XcbInterface::onPaint(DesktopManager* desktopManager) void XcbInterface::OnExposeEvent(xcb_expose_event_t* event, DesktopManager* desktopManager) { // Update the window - if (mUseOpenGl) + if (mUseHardwareRendering) { mGlxInterface->Draw(); mGlxInterface->SwapBuffers(mX11Display); @@ -247,7 +241,7 @@ void XcbInterface::loop(DesktopManager* desktopManager) void XcbInterface::OnLoopCompleted(DesktopManager* desktopManagers) { - if (mUseOpenGl) + if (mUseHardwareRendering) { mGlxInterface->DestroyWindow(mX11Display); mGlxInterface->DestroyContext(mX11Display); diff --git a/src/windows/ui_interfaces/x11/XcbInterface.h b/src/windows/ui_interfaces/x11/XcbInterface.h index 71be0a3..3a76031 100644 --- a/src/windows/ui_interfaces/x11/XcbInterface.h +++ b/src/windows/ui_interfaces/x11/XcbInterface.h @@ -31,8 +31,6 @@ public: ~XcbInterface(); - void SetUseOpenGl(bool use); - void initialize(DesktopManager* desktopManager) override; void loop(DesktopManager* desktopManager) override; @@ -66,7 +64,6 @@ private: void OnLoopCompleted(DesktopManager* desktopManagers); private: - bool mUseOpenGl {false}; xcb_connection_t* mConnection; _XDisplay* mX11Display; GlxInterfacePtr mGlxInterface; diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 9115dd1..2ec7d73 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -38,6 +38,7 @@ list(APPEND TestFiles ) endif() +set(OpenGL_GL_PREFERENCE "GLVND") find_package(OpenGL QUIET) if (OpenGL_FOUND) list(APPEND TestFiles diff --git a/test/graphics/TestOpenGlRendering.cpp b/test/graphics/TestOpenGlRendering.cpp index 04e3436..03050fb 100644 --- a/test/graphics/TestOpenGlRendering.cpp +++ b/test/graphics/TestOpenGlRendering.cpp @@ -20,7 +20,7 @@ public: bool useOpenGl = true; XcbInterface window_interface; - window_interface.SetUseOpenGl(true); + window_interface.setUseHardwareRendering(true); window_interface.initialize(desktopManager.get()); window_interface.addWindow(mainWindow, desktopManager.get()); window_interface.showWindow(mainWindow); diff --git a/test/windows/TestWaylandWindow.cpp b/test/windows/TestWaylandWindow.cpp index e665b62..10955a7 100644 --- a/test/windows/TestWaylandWindow.cpp +++ b/test/windows/TestWaylandWindow.cpp @@ -12,6 +12,7 @@ int main() auto desktop_manager = std::make_unique(); WaylandWindowInterface window_interface; + window_interface.setUseHardwareRendering(true); window_interface.initialize(desktop_manager.get()); auto window = mt::Window::Create();