VTK
vtkEGLRenderWindow.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkEGLRenderWindow.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 =========================================================================*/
26 #ifndef vtkEGLRenderWindow_h
27 #define vtkEGLRenderWindow_h
28 
29 #include "vtkRenderingOpenGL2Module.h" // For export macro
30 #include "vtkOpenGLRenderWindow.h"
31 
32 class vtkIdList;
33 
34 class VTKRENDERINGOPENGL2_EXPORT vtkEGLRenderWindow : public vtkOpenGLRenderWindow
35 {
36 public:
37  static vtkEGLRenderWindow *New();
39  void PrintSelf(ostream& os, vtkIndent indent);
40 
44  virtual void Start(void);
45 
49  virtual void Frame(void);
50 
54  virtual void WindowInitialize(void);
55 
62  virtual void Initialize(void);
63 
69  virtual void Finalize(void);
70 
74  virtual void SetFullScreen(int);
75 
79  virtual void WindowRemap(void);
80 
84  virtual void PrefFullScreen(void);
85 
89  virtual void SetSize(int,int);
90  virtual void SetSize(int a[2]) {this->SetSize(a[0], a[1]);}
91 
98  virtual void SetStereoCapableWindow(int capable);
99 
103  void MakeCurrent();
104 
108  virtual bool IsCurrent();
109 
113  int IsDirect() { return 1;};
114 
118  virtual int *GetScreenSize();
119 
123  virtual int *GetPosition();
124 
126 
129  virtual void SetDisplayId(void *) {};
130  virtual void SetWindowId(void *window);
131  virtual void SetNextWindowId(void *) {}
132  virtual void SetParentId(void *) {}
133  virtual void *GetGenericDisplayId();
134  virtual void *GetGenericWindowId() {return NULL;}
135  virtual void *GetGenericParentId() {return NULL;}
136  virtual void *GetGenericContext();
137  virtual void *GetGenericDrawable() {return NULL;}
138  virtual void SetWindowInfo(char *);
139  virtual void SetNextWindowInfo(char *) {}
140  virtual void SetParentInfo(char *) {}
142 
143  void SetWindowName(const char *);
144 
146 
149  void SetPosition(int,int);
150  void SetPosition(int a[2]) {this->SetPosition(a[0], a[1]);};
152 
154 
158  void HideCursor();
159  void ShowCursor();
161 
166  void Render();
167 
174  virtual int GetEventPending() { return 0;};
175 
176  int GetOwnWindow() { return this->OwnWindow; };
178 
181  virtual void SetOffScreenRendering (int value);
182  virtual int GetOffScreenRendering ();
184 
189  void GetEGLSurfaceSize(int* width, int* height);
193  int GetNumberOfDevices();
200  virtual bool IsPointSpriteBugPresent();
201 
202 protected:
205 
206  int ScreenSize[2];
210  class vtkInternals;
211  vtkInternals* Internals;
212 
213  void CreateAWindow();
214  void DestroyWindow();
215  void ResizeWindow(int width, int height);
216 
222  void SetDeviceAsDisplay(int deviceIndex);
223 
224 private:
225  vtkEGLRenderWindow(const vtkEGLRenderWindow&) = delete;
226  void operator=(const vtkEGLRenderWindow&) = delete;
227 
228  bool DeviceExtensionsPresent;
229 };
230 
231 
232 
233 #endif
OpenGL rendering window.
virtual void SetOffScreenRendering(int)
Create a window in memory instead of on the screen.
virtual void SetDisplayId(void *)
Dummy stubs for vtkWindow API.
virtual void Finalize()=0
Finalize the rendering process.
vtkInternals * Internals
virtual void * GetGenericDrawable()
Dummy stubs for vtkWindow API.
virtual void WindowRemap()=0
Remap the rendering window.
virtual void SetNextWindowId(void *)
Dummy stubs for vtkWindow API.
virtual void HideCursor()=0
Hide or Show the mouse cursor, it is nice to be able to hide the default cursor if you want VTK to di...
virtual void SetNextWindowInfo(char *)
Dummy stubs for vtkWindow API.
void SetPosition(int a[2])
Move the window to a new position on the display.
static vtkRenderWindow * New()
Construct an instance of vtkRenderWindow with its screen size set to 300x300, borders turned on...
virtual int * GetScreenSize()=0
Get the current size of the screen in pixels.
virtual void * GetGenericWindowId()
Dummy stubs for vtkWindow API.
void * GetGenericContext() override=0
Dummy stubs for vtkWindow API.
virtual void SetParentInfo(char *)
Dummy stubs for vtkWindow API.
virtual int GetOffScreenRendering()
Create a window in memory instead of on the screen.
void Render() override
Ask each renderer owned by this RenderWindow to render its image and synchronize this process...
virtual void SetFullScreen(int)=0
Turn on/off rendering full screen window size.
int IsDirect()
Is this render window using hardware acceleration? 0-false, 1-true.
virtual void SetStereoCapableWindow(int capable)
Prescribe that the window be created in a stereo-capable mode.
void * GetGenericDisplayId() override=0
Dummy stubs for vtkWindow API.
virtual bool IsCurrent()=0
Tells if this window is the current graphics context for the calling thread.
virtual void SetParentId(void *)
Dummy stubs for vtkWindow API.
void SetWindowId(void *) override=0
Dummy stubs for vtkWindow API.
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual void DestroyWindow()=0
Destroy a not-off-screen window.
list of point or cell ids
Definition: vtkIdList.h:36
void SetWindowInfo(char *) override=0
Dummy stubs for vtkWindow API.
virtual void SetSize(int a[2])
Set the size of the window in screen coordinates in pixels.
virtual int * GetPosition()
Set/Get the position in screen coordinates of the rendering window.
virtual void Frame()=0
A termination method performed at the end of the rendering process to do things like swapping buffers...
virtual int GetEventPending()
Check to see if a mouse button has been pressed.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetSize(int a[2]) override
Set the size of the window in screen coordinates in pixels.
virtual void Start()=0
Initialize the rendering process.
virtual void SetWindowName(const char *)
Get name of rendering window.
virtual void SetPosition(int, int)
Set/Get the position in screen coordinates of the rendering window.
virtual void Initialize(void)
Initialize the rendering window.
virtual bool IsPointSpriteBugPresent()
Returns true if driver has an EGL/OpenGL bug that makes vtkChartsCoreCxx-TestChartDoubleColors and ot...
virtual void CreateAWindow()=0
Create a not-off-screen window.
OpenGL rendering window.
virtual int GetNumberOfDevices()
Returns the number of devices (graphics cards) on a system.
void MakeCurrent() override=0
Attempt to make this window the current graphics context for the calling thread.
virtual void ShowCursor()=0
Hide or Show the mouse cursor, it is nice to be able to hide the default cursor if you want VTK to di...
virtual void * GetGenericParentId()
Dummy stubs for vtkWindow API.