VTK  9.6.20260304
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
16
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;
28
29class VTKRENDERINGOPENGL2_EXPORT VTK_MARSHALAUTO vtkOSOpenGLRenderWindow
31{
32public:
37 void PrintSelf(ostream& os, vtkIndent indent) override;
38
42 void Frame() override;
43
47 virtual void WindowInitialize();
48
55 void Initialize() override;
56
62 void Finalize() override;
63
67 void SetFullScreen(vtkTypeBool) override;
68
70
77 void SetSize(int width, int height) override;
78 void SetSize(int a[2]) override { this->SetSize(a[0], a[1]); }
80
85 int* GetScreenSize() VTK_SIZEHINT(2) override;
86
91 int* GetPosition() VTK_SIZEHINT(2) override;
92
94
97 void SetPosition(int x, int y) override;
98 void SetPosition(int a[2]) override { this->SetPosition(a[0], a[1]); }
100
107 void SetStereoCapableWindow(vtkTypeBool capable) override;
108
112 void MakeCurrent() override;
113
117 bool IsCurrent() override;
118
124 void SetForceMakeCurrent() override;
125
129 const char* ReportCapabilities() override;
130
134 int SupportsOpenGL() override;
135
140
144 void WindowRemap() override;
145
147
150 void* GetGenericDisplayId() override { return nullptr; }
151 void* GetGenericWindowId() override;
152 void* GetGenericParentId() override { return nullptr; }
153 void* GetGenericContext() override;
154 void* GetGenericDrawable() override { return nullptr; }
156
161 void SetDisplayId(void*) override {}
162
166 void SetParentId(void*) override;
167
171 void SetWindowId(void*) override;
172
178 void SetNextWindowId(void*) override;
179
180 void SetWindowName(const char*) override;
181
186 void HideCursor() override {}
187 void ShowCursor() override {}
188
195
199 void SetWindowInfo(const char* info) override;
200
204 void SetNextWindowInfo(const char* info) override;
205
209 void SetParentInfo(const char* info) override;
210
211protected:
214
215 vtkOSOpenGLRenderWindowInternal* Internal;
216
221
222 void CreateAWindow() override;
223 void DestroyWindow() override;
224 void CreateOffScreenWindow(int width, int height);
226 void ResizeOffScreenWindow(int width, int height);
227
228private:
230 void operator=(const vtkOSOpenGLRenderWindow&) = delete;
231};
232
233#define vtkOSOpenGLRenderWindow_OVERRIDE_ATTRIBUTES \
234 vtkOSOpenGLRenderWindow::CreateOverrideAttributes()
235VTK_ABI_NAMESPACE_END
236#endif
list of point or cell ids
Definition vtkIdList.h:133
a simple class to control print indentation
Definition vtkIndent.h:108
int * GetPosition() override
Get the position (x and y) of the rendering window in screen coordinates (in pixels).
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?
vtkOSOpenGLRenderWindowInternal * Internal
~vtkOSOpenGLRenderWindow() override
vtkTypeBool IsDirect() override
Is this render window using hardware acceleration?
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 SetPosition(int x, int y) override
Move the window to a new position on the display.
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.
static vtkOverrideAttribute * CreateOverrideAttributes()
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.
Attribute for vtkObjectFactory overrides.
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_SIZEHINT(...)
#define VTK_MARSHALAUTO
#define VTK_NEWINSTANCE