KWin
Loading...
Searching...
No Matches
glxcontext.h
Go to the documentation of this file.
1/*
2 KWin - the KDE window manager
3 This file is part of the KDE project.
4
5 SPDX-FileCopyrightText: 2023 Xaver Hugl <xaver.hugl@gmail.com>
6
7 SPDX-License-Identifier: GPL-2.0-or-later
8*/
9#pragma once
12
13#include <epoxy/glx.h>
14
15namespace KWin
16{
17
19{
20public:
21 GlxContext(::Display *display, GLXWindow window, GLXContext handle);
22 ~GlxContext() override;
23
24 bool makeCurrent() const;
25 bool doneCurrent() const;
26
27 static std::unique_ptr<GlxContext> create(GlxBackend *backend, GLXFBConfig fbconfig, GLXWindow glxWindow);
28
29private:
30 ::Display *const m_display;
31 const GLXWindow m_window;
32 const GLXContext m_handle;
33 uint32_t m_vao = 0;
34};
35
36}
OpenGL Backend using GLX over an X overlay window.
static std::unique_ptr< GlxContext > create(GlxBackend *backend, GLXFBConfig fbconfig, GLXWindow glxWindow)
GlxContext(::Display *display, GLXWindow window, GLXContext handle)
bool makeCurrent() const
~GlxContext() override
bool doneCurrent() const
struct _XDisplay Display