4#ifndef vtkEGLRenderWindowInternals_h
5#define vtkEGLRenderWindowInternals_h
10#include "vtkglad/include/glad/egl.h"
12VTK_ABI_NAMESPACE_BEGIN
25 [[nodiscard]] EGLDisplay
GetDisplay()
const {
return this->Display; }
30 [[nodiscard]] EGLDisplay
GetSurface()
const {
return this->Surface; }
36 [[nodiscard]] EGLContext
GetContext()
const {
return this->Context; }
37 void SetContext(EGLContext context) { this->Context = context; }
44 [[nodiscard]] EGLNativeWindowType
GetWindow()
const {
return this->Window; }
45 void SetWindow(EGLNativeWindowType window) { this->Window = window; }
106 EGLNativeWindowType Window;
111 int DeviceIndex = -1;
112 bool UseOnscreenRendering =
false;
114 std::unique_ptr<vtkEGLConfig> Config;
Internal class used to store and control EGL state.
vtkEGLRenderWindowInternals()
void SwapBuffer()
Ensure to call the SwapBuffers() on the correct display and surface.
EGLNativeWindowType GetWindow() const
Get/Set the EGLWindow.
EGLDisplay GetDisplay() const
Return the EGLDisplay.
bool SetDeviceAsDisplay(int deviceIndex)
Set the wanted device for display if the device is available.
EGLDisplay GetSurface() const
Return the EGLSurface.
void SetUseOnscreenRendering(bool useOnscreenRendering)
Setter to handle onscreen rendering.
void ConfigureWindow(int width, int height)
Configure the current EGLWindow with the requested size.
~vtkEGLRenderWindowInternals()=default
bool MakeCurrent()
Try to attach the EGL rendering context to the EGL surface.
void SetContext(EGLContext context)
Get/Set the EGLContext.
EGLContext GetContext() const
Get/Set the EGLContext.
void SetDeviceIndex(int deviceIndex)
Setter used to store the device expected by the user.
void ReleaseCurrent()
Release the EGL state.
int GetNumberOfDevices()
Get the number of devices (graphic cards) from the system.
void SetWindow(EGLNativeWindowType window)
Get/Set the EGLWindow.
void GetSizeFromSurface(int *size)
Get the current size of the EGLSurface.
void DestroyWindow()
Release EGL window.