VTK  9.2.6
vtkGenericOpenGLRenderWindow.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkRenderWindow.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
30#ifndef vtkGenericOpenGLRenderWindow_h
31#define vtkGenericOpenGLRenderWindow_h
32
34#include "vtkRenderingOpenGL2Module.h" // For export macro
35
36class VTKRENDERINGOPENGL2_EXPORT vtkGenericOpenGLRenderWindow : public vtkOpenGLRenderWindow
37{
38public:
41 void PrintSelf(ostream& os, vtkIndent indent) override;
42
43protected:
46
47public:
49 void Finalize() override;
50
53 void Frame() override;
54
57 void MakeCurrent() override;
58
62 bool IsCurrent() override;
63
67 int SupportsOpenGL() override;
68
73
74 // {@
76 void SetFrontLeftBuffer(unsigned int);
77 void SetFrontRightBuffer(unsigned int);
78 void SetBackLeftBuffer(unsigned int);
79 void SetBackRightBuffer(unsigned int);
80 // }@
81
83
85 void PushState() {}
87 void PopState() {}
88
89 // {@
91 void SetWindowId(void*) override;
92 void* GetGenericWindowId() override;
93 void SetDisplayId(void*) override;
94 void SetParentId(void*) override;
95 void* GetGenericDisplayId() override;
96 void* GetGenericParentId() override;
97 void* GetGenericContext() override;
98 void* GetGenericDrawable() override;
99 void SetWindowInfo(const char*) override;
100 void SetParentInfo(const char*) override;
101 int* GetScreenSize() VTK_SIZEHINT(2) override;
102 void HideCursor() override;
103 void ShowCursor() override;
104 void SetFullScreen(vtkTypeBool) override;
105 void WindowRemap() override;
106 vtkTypeBool GetEventPending() override;
107 void SetNextWindowId(void*) override;
108 void SetNextWindowInfo(const char*) override;
109 void CreateAWindow() override;
110 void DestroyWindow() override;
111 // }@
112
114
118 void SetIsDirect(vtkTypeBool newValue);
119 void SetSupportsOpenGL(int newValue);
120 void SetIsCurrent(bool newValue);
122
130 void Render() override;
131
135 float GetMaximumHardwareLineWidth() override;
136
138
142 vtkSetClampMacro(ForceMaximumHardwareLineWidth, float, 0, VTK_FLOAT_MAX);
143 vtkGetMacro(ForceMaximumHardwareLineWidth, float);
145
147
152 vtkSetMacro(ReadyForRendering, bool);
153 vtkGetMacro(ReadyForRendering, bool);
154
159 vtkSetVector2Macro(ScreenSize, int);
160
164 void SetCurrentCursor(int cShape) override;
165
166 // since we are using an external context it must
167 // specify if the window is mapped or not.
168 vtkSetMacro(Mapped, vtkTypeBool);
169
174 "Deprecated in 9.1 because no one knows what it's for and nothing uses it")
175 bool IsDrawable() override;
176
180 void OpenGLInit() override;
181
182protected:
188 int ReadPixels(
189 const vtkRecti& rect, int front, int glFormat, int glType, void* data, int right) override;
190
191 int SetPixelData(
192 int x1, int y1, int x2, int y2, unsigned char* data, int front, int right) override;
193 int SetPixelData(
194 int x1, int y1, int x2, int y2, vtkUnsignedCharArray* data, int front, int right) override;
195 int SetRGBACharPixelData(
196 int x1, int y1, int x2, int y2, unsigned char* data, int front, int blend, int right) override;
197 int SetRGBACharPixelData(int x, int y, int x2, int y2, vtkUnsignedCharArray* data, int front,
198 int blend = 0, int right = 0) override;
199
200 int DirectStatus;
201 int SupportsOpenGLStatus;
202 bool CurrentStatus;
203 float ForceMaximumHardwareLineWidth;
204 bool ReadyForRendering;
205
206private:
208 void operator=(const vtkGenericOpenGLRenderWindow&) = delete;
209};
210
211#endif
platform independent render window
void * GetGenericWindowId() override
These are window system independent methods that are used to help interface vtkWindow to native windo...
void Finalize() override
Cleans up graphics resources allocated in the context for this VTK scene.
void SetWindowId(void *) override
does nothing
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkGenericOpenGLRenderWindow * New()
~vtkGenericOpenGLRenderWindow() override
vtkTypeBool IsDirect() override
Returns if the context is direct.
void SetParentInfo(const char *) override
These are window system independent methods that are used to help interface vtkWindow to native windo...
void SetDisplayId(void *) override
These are window system independent methods that are used to help interface vtkWindow to native windo...
void Frame() override
flush the pending drawing operations Class user may to watch for WindowFrameEvent and act on it
void SetParentId(void *) override
These are window system independent methods that are used to help interface vtkWindow to native windo...
void SetWindowInfo(const char *) override
These are window system independent methods that are used to help interface vtkWindow to native windo...
void SetBackRightBuffer(unsigned int)
void MakeCurrent() override
Makes the context current.
int SupportsOpenGL() override
Returns if OpenGL is supported.
void PopState()
no-op (for API compat with OpenGL1).
void SetFrontRightBuffer(unsigned int)
void * GetGenericContext() override
These are window system independent methods that are used to help interface vtkWindow to native windo...
void * GetGenericParentId() override
These are window system independent methods that are used to help interface vtkWindow to native windo...
int * GetScreenSize() override
Get the current size of the screen in pixels.
void SetOwnContext(vtkTypeBool)
void * GetGenericDisplayId() override
These are window system independent methods that are used to help interface vtkWindow to native windo...
void SetFrontLeftBuffer(unsigned int)
set the drawing buffers to use
void SetBackLeftBuffer(unsigned int)
void PushState()
no-op (for API compat with OpenGL1).
bool IsCurrent() override
Returns if the context is current.
void * GetGenericDrawable() override
These are window system independent methods that are used to help interface vtkWindow to native windo...
a simple class to control print indentation
Definition vtkIndent.h:34
OpenGL rendering window.
dynamic, self-adjusting array of unsigned char
int vtkTypeBool
Definition vtkABI.h:69
#define VTK_DEPRECATED_IN_9_1_0(reason)
#define VTK_FLOAT_MAX
Definition vtkType.h:163
#define VTK_SIZEHINT(...)