duckstation/src/util/opengl_context_egl_xlib.h
Stenzek e69f0d3cce
OpenGLDevice: Support both XCB and Xlib
Required for NVIDIA+XWayland.
2024-11-11 20:12:26 +10:00

23 lines
800 B
C++

// SPDX-FileCopyrightText: 2019-2024 Connor McLaughlin <stenzek@gmail.com>
// SPDX-License-Identifier: CC-BY-NC-ND-4.0
#pragma once
#include "opengl_context_egl.h"
class OpenGLContextEGLXlib final : public OpenGLContextEGL
{
public:
OpenGLContextEGLXlib();
~OpenGLContextEGLXlib() override;
static std::unique_ptr<OpenGLContext> Create(WindowInfo& wi, SurfaceHandle* surface,
std::span<const Version> versions_to_try, Error* error);
std::unique_ptr<OpenGLContext> CreateSharedContext(WindowInfo& wi, SurfaceHandle* surface, Error* error) override;
protected:
EGLDisplay GetPlatformDisplay(const WindowInfo& wi, Error* error) override;
EGLSurface CreatePlatformSurface(EGLConfig config, const WindowInfo& wi, Error* error) override;
};