VTK  9.4.20250303
vtkEGLRenderWindow.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
20#ifndef vtkEGLRenderWindow_h
21#define vtkEGLRenderWindow_h
22
24#include "vtkRenderingOpenGL2Module.h" // For export macro
25#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
26
27VTK_ABI_NAMESPACE_BEGIN
28class vtkIdList;
29
30class VTKRENDERINGOPENGL2_EXPORT VTK_MARSHALAUTO vtkEGLRenderWindow : public vtkOpenGLRenderWindow
31{
32public:
35 void PrintSelf(ostream& os, vtkIndent indent) override;
36
40 void Frame() override;
41
45 void SetShowWindow(bool) override;
46
50 virtual void WindowInitialize();
51
58 void Initialize() override;
59
65 void Finalize() override;
66
70 void SetFullScreen(vtkTypeBool) override;
71
75 void WindowRemap() override;
76
80 virtual void PrefFullScreen();
81
90 void SetSize(int width, int height) override;
91 void SetSize(int a[2]) override { this->SetSize(a[0], a[1]); }
92
99 void SetStereoCapableWindow(vtkTypeBool capable) override;
100
104 void MakeCurrent() override;
105
109 void ReleaseCurrent() override;
110
114 bool IsCurrent() override;
115
119 vtkTypeBool IsDirect() override { return 1; }
120
125 int* GetScreenSize() VTK_SIZEHINT(2) override;
126
131 int* GetPosition() VTK_SIZEHINT(2) override;
132
134
137 void SetDisplayId(void*) override {}
138 void SetWindowId(void* window) override;
139 void SetNextWindowId(void*) override {}
140 void SetParentId(void*) override {}
141 void* GetGenericDisplayId() override;
142 void* GetGenericWindowId() override { return nullptr; }
143 void* GetGenericParentId() override { return nullptr; }
144 void* GetGenericContext() override;
145 void* GetGenericDrawable() override { return nullptr; }
146 void SetWindowInfo(const char*) override;
147 void SetNextWindowInfo(const char*) override {}
148 void SetParentInfo(const char*) override {}
150
151 void SetWindowName(const char*) override;
152
154
159 void SetPosition(int x, int y) override;
160 void SetPosition(int a[2]) override { this->SetPosition(a[0], a[1]); }
162
164
168 void HideCursor() override;
169 void ShowCursor() override;
171
176 void Render() override;
177
184 vtkTypeBool GetEventPending() override { return 0; }
185
186 vtkTypeBool GetOwnWindow() { return this->OwnWindow; }
187
192 void GetEGLSurfaceSize(int* width, int* height);
196 int GetNumberOfDevices() override;
203 bool IsPointSpriteBugPresent() override;
204
205 const char* ReportCapabilities() override;
206
207protected:
210
214 class vtkInternals;
215 vtkInternals* Internals;
216
217 void CreateAWindow() override;
218 void DestroyWindow() override;
219 void ResizeWindow(int width, int height);
220
226 bool SetDeviceAsDisplay(int deviceIndex);
227
228private:
229 vtkEGLRenderWindow(const vtkEGLRenderWindow&) = delete;
230 void operator=(const vtkEGLRenderWindow&) = delete;
231};
232
233VTK_ABI_NAMESPACE_END
234#endif
OpenGL rendering window.
void SetParentId(void *) override
Dummy stubs for vtkWindow API.
void * GetGenericWindowId() override
Dummy stubs for vtkWindow API.
void ReleaseCurrent() override
Release the current context.
void WindowRemap() override
Resize the window.
virtual void PrefFullScreen()
Set the preferred window size to full screen.
vtkTypeBool GetEventPending() override
Check to see if a mouse button has been pressed.
void SetFullScreen(vtkTypeBool) override
Change the window to fill the entire screen.
void MakeCurrent() override
Make this window the current OpenGL context.
void SetShowWindow(bool) override
Overridden because vtkEGLRenderWindow window cannot be shown onscreen, except on android.
void SetPosition(int x, int y) override
Set the position (x and y) of the rendering window in screen coordinates (in pixels).
bool SetDeviceAsDisplay(int deviceIndex)
Use EGL_EXT_device_base, EGL_EXT_platform_device and EGL_EXT_platform_base extensions to set the disp...
int * GetScreenSize() override
Get the current size of the screen in pixels.
void SetPosition(int a[2]) override
Set the position (x and y) of the rendering window in screen coordinates (in pixels).
bool IsPointSpriteBugPresent() override
Returns true if driver has an EGL/OpenGL bug that makes vtkChartsCoreCxx-TestChartDoubleColors and ot...
void ResizeWindow(int width, int height)
void HideCursor() override
Hide or Show the mouse cursor, it is nice to be able to hide the default cursor if you want VTK to di...
static vtkEGLRenderWindow * New()
void SetParentInfo(const char *) override
Dummy stubs for vtkWindow API.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void CreateAWindow() override
Create a not-off-screen window.
const char * ReportCapabilities() override
Get report of capabilities for the render window.
void * GetGenericDrawable() override
Dummy stubs for vtkWindow API.
void SetSize(int a[2]) override
Get the size (width and height) of the rendering window in screen coordinates (in pixels).
vtkTypeBool IsDirect() override
Is this render window using hardware acceleration? 0-false, 1-true.
void SetSize(int width, int height) override
Set the size (width and height) of the rendering window in screen coordinates (in pixels).
void GetEGLSurfaceSize(int *width, int *height)
Returns the width and height of the allocated EGL surface.
void Initialize() override
Initialize the rendering window.
bool IsCurrent() override
Tells if this window is the current OpenGL context for the calling thread.
void * GetGenericParentId() override
Dummy stubs for vtkWindow API.
void SetWindowName(const char *) override
Get name of rendering window.
void Frame() override
End the rendering process and display the image.
void SetNextWindowId(void *) override
Dummy stubs for vtkWindow API.
void ShowCursor() override
Hide or Show the mouse cursor, it is nice to be able to hide the default cursor if you want VTK to di...
void SetWindowId(void *window) override
Dummy stubs for vtkWindow API.
void Render() override
This computes the size of the render window before calling the supper classes render.
void * GetGenericDisplayId() override
Dummy stubs for vtkWindow API.
void Finalize() override
"Deinitialize" the rendering window.
~vtkEGLRenderWindow() override
void * GetGenericContext() override
Dummy stubs for vtkWindow API.
void SetNextWindowInfo(const char *) override
Dummy stubs for vtkWindow API.
int GetNumberOfDevices() override
Returns the number of devices (graphics cards) on a system.
void SetStereoCapableWindow(vtkTypeBool capable) override
Prescribe that the window be created in a stereo-capable mode.
void SetWindowInfo(const char *) override
Dummy stubs for vtkWindow API.
virtual void WindowInitialize()
Initialize the window for rendering.
void DestroyWindow() override
Destroy a not-off-screen window.
list of point or cell ids
Definition vtkIdList.h:133
a simple class to control print indentation
Definition vtkIndent.h:108
OpenGL rendering window.
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_SIZEHINT(...)
#define VTK_MARSHALAUTO