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 =========================================================================*/
32 #ifndef vtkEGLRenderWindow_h
33 #define vtkEGLRenderWindow_h
34 
35 #include "vtkRenderingOpenGL2Module.h" // For export macro
36 #include "vtkOpenGLRenderWindow.h"
37 
38 class vtkIdList;
39 
40 class VTKRENDERINGOPENGL2_EXPORT vtkEGLRenderWindow : public vtkOpenGLRenderWindow
41 {
42 public:
45  void PrintSelf(ostream& os, vtkIndent indent);
46 
50  virtual void Start(void);
51 
55  virtual void Frame(void);
56 
60  virtual void WindowInitialize(void);
61 
68  void Initialize(void) override;
69 
75  virtual void Finalize(void);
76 
80  virtual void SetFullScreen(vtkTypeBool);
81 
85  virtual void WindowRemap(void);
86 
90  virtual void PrefFullScreen(void);
91 
95  virtual void SetSize(int,int);
96  virtual void SetSize(int a[2]) {this->SetSize(a[0], a[1]);}
97 
104  virtual void SetStereoCapableWindow(vtkTypeBool capable);
105 
109  void MakeCurrent();
110 
114  virtual bool IsCurrent();
115 
119  int IsDirect() { return 1;};
120 
124  virtual int *GetScreenSize() VTK_SIZEHINT(2);
125 
129  virtual int *GetPosition() VTK_SIZEHINT(2);
130 
132 
135  virtual void SetDisplayId(void *) {};
136  virtual void SetWindowId(void *window);
137  virtual void SetNextWindowId(void *) {}
138  virtual void SetParentId(void *) {}
139  virtual void *GetGenericDisplayId();
140  virtual void *GetGenericWindowId() {return NULL;}
141  virtual void *GetGenericParentId() {return NULL;}
142  virtual void *GetGenericContext();
143  virtual void *GetGenericDrawable() {return NULL;}
144  virtual void SetWindowInfo(const char *);
145  virtual void SetNextWindowInfo(const char *) {}
146  virtual void SetParentInfo(const char *) {}
148 
149  void SetWindowName(const char *);
150 
152 
155  void SetPosition(int,int);
156  void SetPosition(int a[2]) {this->SetPosition(a[0], a[1]);};
158 
160 
164  void HideCursor();
165  void ShowCursor();
167 
172  void Render();
173 
180  virtual int GetEventPending() { return 0;};
181 
182  int GetOwnWindow() { return this->OwnWindow; };
184 
190 
195  void GetEGLSurfaceSize(int* width, int* height);
206  bool IsPointSpriteBugPresent() override;
207 
208 protected:
211 
212  int ScreenSize[2];
216  class vtkInternals;
217  vtkInternals* Internals;
218 
219  void CreateAWindow() override;
220  void DestroyWindow() override;
221  void ResizeWindow(int width, int height);
222 
228  void SetDeviceAsDisplay(int deviceIndex);
229 
230 private:
231  vtkEGLRenderWindow(const vtkEGLRenderWindow&) = delete;
232  void operator=(const vtkEGLRenderWindow&) = delete;
233 
234  bool DeviceExtensionsPresent;
235 };
236 
237 
238 
239 #endif
vtkEGLRenderWindow
OpenGL rendering window.
Definition: vtkEGLRenderWindow.h:41
vtkEGLRenderWindow::SetNextWindowInfo
virtual void SetNextWindowInfo(const char *)
Definition: vtkEGLRenderWindow.h:145
vtkX3D::value
@ value
Definition: vtkX3D.h:220
vtkEGLRenderWindow::GetOwnWindow
int GetOwnWindow()
Definition: vtkEGLRenderWindow.h:182
vtkEGLRenderWindow::GetGenericDisplayId
virtual void * GetGenericDisplayId()
vtkEGLRenderWindow::SetDeviceAsDisplay
void SetDeviceAsDisplay(int deviceIndex)
Use EGL_EXT_device_base, EGL_EXT_platform_device and EGL_EXT_platform_base extensions to set the disp...
vtkEGLRenderWindow::WindowInitialize
virtual void WindowInitialize(void)
Initialize the window for rendering.
vtkEGLRenderWindow::SetWindowId
virtual void SetWindowId(void *window)
vtkEGLRenderWindow::SetStereoCapableWindow
virtual void SetStereoCapableWindow(vtkTypeBool capable)
Prescribe that the window be created in a stereo-capable mode.
vtkEGLRenderWindow::SetParentInfo
virtual void SetParentInfo(const char *)
Definition: vtkEGLRenderWindow.h:146
vtkEGLRenderWindow::IsDirect
int IsDirect()
Is this render window using hardware acceleration? 0-false, 1-true.
Definition: vtkEGLRenderWindow.h:119
vtkEGLRenderWindow::HideCursor
void HideCursor()
Hide or Show the mouse cursor, it is nice to be able to hide the default cursor if you want VTK to di...
vtkEGLRenderWindow::Internals
vtkInternals * Internals
Definition: vtkEGLRenderWindow.h:216
vtkEGLRenderWindow::SetNextWindowId
virtual void SetNextWindowId(void *)
Definition: vtkEGLRenderWindow.h:137
vtkEGLRenderWindow::CreateAWindow
void CreateAWindow() override
Create a not-off-screen window.
vtkEGLRenderWindow::WindowRemap
virtual void WindowRemap(void)
Resize the window.
vtkEGLRenderWindow::GetGenericParentId
virtual void * GetGenericParentId()
Definition: vtkEGLRenderWindow.h:141
vtkEGLRenderWindow::New
static vtkEGLRenderWindow * New()
vtkEGLRenderWindow::GetNumberOfDevices
int GetNumberOfDevices()
Returns the number of devices (graphics cards) on a system.
vtkEGLRenderWindow::GetEventPending
virtual int GetEventPending()
Check to see if a mouse button has been pressed.
Definition: vtkEGLRenderWindow.h:180
VTK_SIZEHINT
#define VTK_SIZEHINT(...)
Definition: vtkWrappingHints.h:42
vtkX3D::height
@ height
Definition: vtkX3D.h:254
vtkEGLRenderWindow::SetPosition
void SetPosition(int, int)
Move the window to a new position on the display.
vtkEGLRenderWindow::SetSize
virtual void SetSize(int, int)
Specify the size of the rendering window in pixels.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkEGLRenderWindow::Start
virtual void Start(void)
Begin the rendering process.
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:37
vtkEGLRenderWindow::MakeCurrent
void MakeCurrent()
Make this window the current OpenGL context.
vtkEGLRenderWindow::IsCurrent
virtual bool IsCurrent()
Tells if this window is the current OpenGL context for the calling thread.
vtkEGLRenderWindow::Finalize
virtual void Finalize(void)
"Deinitialize" the rendering window.
vtkEGLRenderWindow::SetParentId
virtual void SetParentId(void *)
Definition: vtkEGLRenderWindow.h:138
vtkEGLRenderWindow::SetWindowName
void SetWindowName(const char *)
vtkEGLRenderWindow::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkEGLRenderWindow::GetGenericDrawable
virtual void * GetGenericDrawable()
Definition: vtkEGLRenderWindow.h:143
vtkEGLRenderWindow::GetOffScreenRendering
virtual vtkTypeBool GetOffScreenRendering()
vtkEGLRenderWindow::SetPosition
void SetPosition(int a[2])
Definition: vtkEGLRenderWindow.h:156
vtkEGLRenderWindow::DestroyWindow
void DestroyWindow() override
Destroy a not-off-screen window.
vtkEGLRenderWindow::SetFullScreen
virtual void SetFullScreen(vtkTypeBool)
Change the window to fill the entire screen.
vtkEGLRenderWindow::SetSize
virtual void SetSize(int a[2])
Definition: vtkEGLRenderWindow.h:96
vtkEGLRenderWindow::ShowCursor
void ShowCursor()
vtkEGLRenderWindow::OwnWindow
int OwnWindow
Definition: vtkEGLRenderWindow.h:213
vtkEGLRenderWindow::Frame
virtual void Frame(void)
End the rendering process and display the image.
vtkEGLRenderWindow::GetGenericWindowId
virtual void * GetGenericWindowId()
Definition: vtkEGLRenderWindow.h:140
vtkEGLRenderWindow::IsPointSpriteBugTested
bool IsPointSpriteBugTested
Definition: vtkEGLRenderWindow.h:214
vtkEGLRenderWindow::Initialize
void Initialize(void) override
Initialize the rendering window.
vtkEGLRenderWindow::ResizeWindow
void ResizeWindow(int width, int height)
vtkEGLRenderWindow::SetOffScreenRendering
virtual void SetOffScreenRendering(vtkTypeBool value)
Render without displaying the window.
vtkEGLRenderWindow::IsPointSpriteBugPresent_
bool IsPointSpriteBugPresent_
Definition: vtkEGLRenderWindow.h:215
vtkEGLRenderWindow::GetGenericContext
virtual void * GetGenericContext()
vtkEGLRenderWindow::vtkEGLRenderWindow
vtkEGLRenderWindow()
vtkEGLRenderWindow::SetWindowInfo
virtual void SetWindowInfo(const char *)
vtkEGLRenderWindow::PrefFullScreen
virtual void PrefFullScreen(void)
Set the preferred window size to full screen.
vtkOpenGLRenderWindow
OpenGL rendering window.
Definition: vtkOpenGLRenderWindow.h:54
vtkEGLRenderWindow::Render
void Render()
This computes the size of the render window before calling the supper classes render.
vtkEGLRenderWindow::GetScreenSize
virtual int * GetScreenSize()
Get the current size of the screen in pixels.
vtkEGLRenderWindow::IsPointSpriteBugPresent
bool IsPointSpriteBugPresent() override
Returns true if driver has an EGL/OpenGL bug that makes vtkChartsCoreCxx-TestChartDoubleColors and ot...
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkEGLRenderWindow::GetEGLSurfaceSize
void GetEGLSurfaceSize(int *width, int *height)
Returns the width and height of the allocated EGL surface.
vtkOpenGLRenderWindow.h
vtkEGLRenderWindow::~vtkEGLRenderWindow
~vtkEGLRenderWindow()