VTK  9.4.20250413
vtkOSOpenGLRenderWindow.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
17#ifndef vtkOSOpenGLRenderWindow_h
18#define vtkOSOpenGLRenderWindow_h
19
21#include "vtkRenderingOpenGL2Module.h" // For export macro
22#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
23
24VTK_ABI_NAMESPACE_BEGIN
25class vtkIdList;
26class vtkOSOpenGLRenderWindowInternal;
27
28class VTKRENDERINGOPENGL2_EXPORT VTK_MARSHALAUTO vtkOSOpenGLRenderWindow
30{
31public:
34 void PrintSelf(ostream& os, vtkIndent indent) override;
35
39 void Frame() override;
40
44 virtual void WindowInitialize();
45
52 void Initialize() override;
53
59 void Finalize() override;
60
64 void SetFullScreen(vtkTypeBool) override;
65
67
74 void SetSize(int width, int height) override;
75 void SetSize(int a[2]) override { this->SetSize(a[0], a[1]); }
77
82 int* GetScreenSize() VTK_SIZEHINT(2) override;
83
88 int* GetPosition() VTK_SIZEHINT(2) override;
89
91
94 void SetPosition(int x, int y) override;
95 void SetPosition(int a[2]) override { this->SetPosition(a[0], a[1]); }
97
104 void SetStereoCapableWindow(vtkTypeBool capable) override;
105
109 void MakeCurrent() override;
110
114 bool IsCurrent() override;
115
121 void SetForceMakeCurrent() override;
122
126 const char* ReportCapabilities() override;
127
131 int SupportsOpenGL() override;
132
137
141 void WindowRemap() override;
142
144
147 void* GetGenericDisplayId() override { return nullptr; }
148 void* GetGenericWindowId() override;
149 void* GetGenericParentId() override { return nullptr; }
150 void* GetGenericContext() override;
151 void* GetGenericDrawable() override { return nullptr; }
153
158 void SetDisplayId(void*) override {}
159
163 void SetParentId(void*) override;
164
168 void SetWindowId(void*) override;
169
175 void SetNextWindowId(void*) override;
176
177 void SetWindowName(const char*) override;
178
183 void HideCursor() override {}
184 void ShowCursor() override {}
185
192
196 void SetWindowInfo(const char* info) override;
197
201 void SetNextWindowInfo(const char* info) override;
202
206 void SetParentInfo(const char* info) override;
207
208protected:
211
212 vtkOSOpenGLRenderWindowInternal* Internal;
213
218
219 void CreateAWindow() override;
220 void DestroyWindow() override;
221 void CreateOffScreenWindow(int width, int height);
223 void ResizeOffScreenWindow(int width, int height);
224
225private:
227 void operator=(const vtkOSOpenGLRenderWindow&) = delete;
228};
229
230VTK_ABI_NAMESPACE_END
231#endif
list of point or cell ids
Definition vtkIdList.h:133
a simple class to control print indentation
Definition vtkIndent.h:108
OffScreen Mesa rendering window.
void WindowRemap() override
Resize the window.
void SetFullScreen(vtkTypeBool) override
Change the window to fill the entire screen.
virtual void WindowInitialize()
Initialize the window for rendering.
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 SetSize(int a[2]) override
Set the size of the window in screen coordinates in pixels.
int SupportsOpenGL() override
Does this render window support OpenGL? 0-false, 1-true.
vtkOSOpenGLRenderWindowInternal * Internal
~vtkOSOpenGLRenderWindow() override
vtkTypeBool IsDirect() override
Is this render window using hardware acceleration? 0-false, 1-true.
int * GetScreenSize() override
Get the current size of the screen in pixels.
void SetParentId(void *) override
Sets the parent of the window that WILL BE created.
void MakeCurrent() override
Make this window the current OpenGL context.
void SetWindowId(void *) override
Set this RenderWindow's X window id to a pre-existing window.
void SetNextWindowInfo(const char *info) override
Set the window info that will be used after WindowRemap()
void Initialize() override
Initialize the rendering window.
void CreateAWindow() override
Create a not-off-screen window.
void CreateOffScreenWindow(int width, int height)
void SetNextWindowId(void *) override
Set the window id of the new window once a WindowRemap is done.
void SetSize(int width, int height) override
Set the size of the window in screen coordinates in pixels.
void * GetGenericParentId() override
Xwindow get set functions.
vtkTypeBool GetEventPending() override
Check to see if a mouse button has been pressed.
void SetPosition(int a[2]) override
Move the window to a new position on the display.
void SetForceMakeCurrent() override
If called, allow MakeCurrent() to skip cache-check when called.
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...
void SetParentInfo(const char *info) override
Sets the X window id of the window that WILL BE created.
void DestroyWindow() override
Destroy a not-off-screen window.
bool IsCurrent() override
Tells if this window is the current OpenGL context for the calling thread.
void Frame() override
End the rendering process and display the image.
static vtkOSOpenGLRenderWindow * New()
const char * ReportCapabilities() override
Get report of capabilities for the render window.
void * GetGenericDrawable() override
Xwindow get set functions.
void * GetGenericDisplayId() override
Xwindow get set functions.
void * GetGenericContext() override
Xwindow get set functions.
void SetWindowName(const char *) override
Get name of rendering window.
void SetDisplayId(void *) override
Set the X display id for this RenderWindow to use to a pre-existing X display id.
void * GetGenericWindowId() override
Xwindow get set functions.
void SetStereoCapableWindow(vtkTypeBool capable) override
Prescribe that the window be created in a stereo-capable mode.
void ResizeOffScreenWindow(int width, int height)
void Finalize() override
"Deinitialize" the rendering window.
void SetWindowInfo(const char *info) override
Set this RenderWindow's X window id to a pre-existing window.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
OpenGL rendering window.
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_SIZEHINT(...)
#define VTK_MARSHALAUTO