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=========================================================================*/
122#ifndef vtkGenericOpenGLRenderWindow_h
123#define vtkGenericOpenGLRenderWindow_h
124
126#include "vtkRenderingOpenGL2Module.h" // For export macro
127
128class VTKRENDERINGOPENGL2_EXPORT vtkGenericOpenGLRenderWindow : public vtkOpenGLRenderWindow
129{
130public:
133 void PrintSelf(ostream& os, vtkIndent indent) override;
134
135protected:
138
139public:
141 void Finalize() override;
142
145 void Frame() override;
146
149 void MakeCurrent() override;
150
154 bool IsCurrent() override;
155
159 int SupportsOpenGL() override;
160
165
166 // {@
168 void SetFrontLeftBuffer(unsigned int);
169 void SetFrontRightBuffer(unsigned int);
170 void SetBackLeftBuffer(unsigned int);
171 void SetBackRightBuffer(unsigned int);
172 // }@
173
175
177 void PushState() {}
179 void PopState() {}
180
181 // {@
183 void SetWindowId(void*) override;
184 void* GetGenericWindowId() override;
185 void SetDisplayId(void*) override;
186 void SetParentId(void*) override;
187 void* GetGenericDisplayId() override;
188 void* GetGenericParentId() override;
189 void* GetGenericContext() override;
190 void* GetGenericDrawable() override;
191 void SetWindowInfo(const char*) override;
192 void SetParentInfo(const char*) override;
193 int* GetScreenSize() VTK_SIZEHINT(2) override;
194 void HideCursor() override;
195 void ShowCursor() override;
196 void SetFullScreen(vtkTypeBool) override;
197 void WindowRemap() override;
198 vtkTypeBool GetEventPending() override;
199 void SetNextWindowId(void*) override;
200 void SetNextWindowInfo(const char*) override;
201 void CreateAWindow() override;
202 void DestroyWindow() override;
203 // }@
204
206
210 void SetIsDirect(vtkTypeBool newValue);
211 void SetSupportsOpenGL(int newValue);
212 void SetIsCurrent(bool newValue);
214
222 void Render() override;
223
227 float GetMaximumHardwareLineWidth() override;
228
230
234 vtkSetClampMacro(ForceMaximumHardwareLineWidth, float, 0, VTK_FLOAT_MAX);
235 vtkGetMacro(ForceMaximumHardwareLineWidth, float);
237
239
244 vtkSetMacro(ReadyForRendering, bool);
245 vtkGetMacro(ReadyForRendering, bool);
246
251 vtkSetVector2Macro(ScreenSize, int);
252
256 void SetCurrentCursor(int cShape) override;
257
258 // since we are using an external context it must
259 // specify if the window is mapped or not.
260 vtkSetMacro(Mapped, vtkTypeBool);
261
266 "Deprecated in 9.1 because no one knows what it's for and nothing uses it")
267 bool IsDrawable() override;
268
272 void OpenGLInit() override;
273
274protected:
280 int ReadPixels(
281 const vtkRecti& rect, int front, int glFormat, int glType, void* data, int right) override;
282
283 int SetPixelData(
284 int x1, int y1, int x2, int y2, unsigned char* data, int front, int right) override;
285 int SetPixelData(
286 int x1, int y1, int x2, int y2, vtkUnsignedCharArray* data, int front, int right) override;
287 int SetRGBACharPixelData(
288 int x1, int y1, int x2, int y2, unsigned char* data, int front, int blend, int right) override;
289 int SetRGBACharPixelData(int x, int y, int x2, int y2, vtkUnsignedCharArray* data, int front,
290 int blend = 0, int right = 0) override;
291
292 int DirectStatus;
293 int SupportsOpenGLStatus;
294 bool CurrentStatus;
295 float ForceMaximumHardwareLineWidth;
296 bool ReadyForRendering;
297
298private:
300 void operator=(const vtkGenericOpenGLRenderWindow&) = delete;
301};
302
303#endif
platform independent render window
void * GetGenericWindowId() override
Dummy stubs for vtkWindow API.
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
Dummy stubs for vtkWindow API.
void SetDisplayId(void *) override
Dummy stubs for vtkWindow API.
void Frame() override
flush the pending drawing operations Class user may to watch for WindowFrameEvent and act on it
void SetParentId(void *) override
Dummy stubs for vtkWindow API.
void SetWindowInfo(const char *) override
Dummy stubs for vtkWindow API.
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
Dummy stubs for vtkWindow API.
void * GetGenericParentId() override
Dummy stubs for vtkWindow API.
int * GetScreenSize() override
Get the current size of the screen in pixels.
void SetOwnContext(vtkTypeBool)
void * GetGenericDisplayId() override
Dummy stubs for vtkWindow API.
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
Dummy stubs for vtkWindow API.
a simple class to control print indentation
Definition: vtkIndent.h:119
OpenGL rendering window.
dynamic, self-adjusting array of unsigned char
@ data
Definition: vtkX3D.h:321
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(...)