VTK  9.7.1
vtkEGLWaylandConfig.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
3 
4 #ifndef vtkEGLWaylandConfig_h
5 #define vtkEGLWaylandConfig_h
6 
7 #include "Private/vtkEGLConfig.h"
8 
9 #include <wayland-client.h>
10 #include <wayland-egl.h>
11 
12 #include "vtkABINamespace.h"
13 
14 VTK_ABI_NAMESPACE_BEGIN
15 
27 {
28 public:
34 
36 
39  [[nodiscard]] void* GetDisplay() override { return this->Display; }
40  [[nodiscard]] EGLenum GetPlatform() override { return EGL_PLATFORM_WAYLAND_EXT; }
41  void CreateContext(EGLContext& context, EGLDisplay display, EGLConfig config) override;
43 
52  EGLSurface& surface, EGLDisplay display, EGLConfig config, int width, int height) override;
53 
54 private:
55  struct wl_display* Display = nullptr;
56  struct wl_surface* Surface = nullptr;
57  wl_egl_window* Window = nullptr;
58 
59  struct xdg_surface* XdgSurface = nullptr;
60  struct xdg_toplevel* XdgToplevel = nullptr;
61 };
62 
63 VTK_ABI_NAMESPACE_END
64 
65 #endif
void * GetDisplay() override
Implementation of vtkEGLConfig.
EGLenum GetPlatform() override
Implementation of vtkEGLConfig.
vtkEGLWaylandConfig()
Setup wayland attributes.
void CreateContext(EGLContext &context, EGLDisplay display, EGLConfig config) override
Implementation of vtkEGLConfig.
Base class for EGL configuration.
Definition: vtkEGLConfig.h:22
void CreateWindowSurface(EGLSurface &surface, EGLDisplay display, EGLConfig config, int width, int height) override
Create the EGL window surface.
vtkEGLWaylandConfig