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:
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);
200  virtual bool IsPointSpriteBugPresent();
201 
202 protected:
205 
206  int ScreenSize[2];
211  class vtkInternals;
212  vtkInternals* Internals;
213 
216  void ResizeWindow(int width, int height);
217 
223  void SetDeviceAsDisplay(int deviceIndex);
224 
225 private:
226  vtkEGLRenderWindow(const vtkEGLRenderWindow&) VTK_DELETE_FUNCTION;
227  void operator=(const vtkEGLRenderWindow&) VTK_DELETE_FUNCTION;
228 
229  bool DeviceExtensionsPresent;
230 };
231 
232 
233 
234 #endif
vtkEGLRenderWindow
OpenGL rendering window.
Definition: vtkEGLRenderWindow.h:35
vtkEGLRenderWindow::Initialize
virtual void Initialize(void)
Initialize the rendering window.
vtkX3D::value
@ value
Definition: vtkX3D.h:220
vtkEGLRenderWindow::GetOwnWindow
int GetOwnWindow()
Definition: vtkEGLRenderWindow.h:176
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::IsDirect
int IsDirect()
Is this render window using hardware acceleration? 0-false, 1-true.
Definition: vtkEGLRenderWindow.h:113
vtkEGLRenderWindow::DeviceIndex
int DeviceIndex
Definition: vtkEGLRenderWindow.h:208
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::SetFullScreen
virtual void SetFullScreen(int)
Change the window to fill the entire screen.
vtkEGLRenderWindow::Internals
vtkInternals * Internals
Definition: vtkEGLRenderWindow.h:211
vtkEGLRenderWindow::SetNextWindowId
virtual void SetNextWindowId(void *)
Definition: vtkEGLRenderWindow.h:131
vtkEGLRenderWindow::WindowRemap
virtual void WindowRemap(void)
Resize the window.
vtkEGLRenderWindow::GetGenericParentId
virtual void * GetGenericParentId()
Definition: vtkEGLRenderWindow.h:135
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:174
vtkOpenGLRenderWindow.h
vtkX3D::height
@ height
Definition: vtkX3D.h:254
vtkEGLRenderWindow::SetParentInfo
virtual void SetParentInfo(char *)
Definition: vtkEGLRenderWindow.h:140
vtkEGLRenderWindow::SetDisplayId
virtual void SetDisplayId(void *)
Dummy stubs for vtkWindow API.
Definition: vtkEGLRenderWindow.h:129
vtkEGLRenderWindow::SetStereoCapableWindow
virtual void SetStereoCapableWindow(int capable)
Prescribe that the window be created in a stereo-capable mode.
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:132
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:137
vtkEGLRenderWindow::SetNextWindowInfo
virtual void SetNextWindowInfo(char *)
Definition: vtkEGLRenderWindow.h:139
vtkEGLRenderWindow::SetPosition
void SetPosition(int a[2])
Definition: vtkEGLRenderWindow.h:150
vtkEGLRenderWindow::SetOffScreenRendering
virtual void SetOffScreenRendering(int value)
Render without displaying the window.
vtkEGLRenderWindow::SetSize
virtual void SetSize(int a[2])
Set the size of the window in screen coordinates in pixels.
Definition: vtkEGLRenderWindow.h:90
vtkEGLRenderWindow::ShowCursor
void ShowCursor()
vtkEGLRenderWindow::OwnWindow
int OwnWindow
Definition: vtkEGLRenderWindow.h:207
vtkEGLRenderWindow::Frame
virtual void Frame(void)
End the rendering process and display the image.
vtkEGLRenderWindow::CreateAWindow
void CreateAWindow()
Create a not-off-screen window.
vtkEGLRenderWindow::GetGenericWindowId
virtual void * GetGenericWindowId()
Definition: vtkEGLRenderWindow.h:134
vtkEGLRenderWindow::IsPointSpriteBugTested
bool IsPointSpriteBugTested
Definition: vtkEGLRenderWindow.h:209
vtkEGLRenderWindow::GetPosition
virtual int * GetPosition()
Get the position in screen coordinates (pixels) of the window.
vtkEGLRenderWindow::ResizeWindow
void ResizeWindow(int width, int height)
vtkEGLRenderWindow::IsPointSpriteBugPresent
virtual bool IsPointSpriteBugPresent()
Returns true if driver has an EGL/OpenGL bug that makes vtkChartsCoreCxx-TestChartDoubleColors and ot...
vtkEGLRenderWindow::SetWindowInfo
virtual void SetWindowInfo(char *)
vtkEGLRenderWindow::IsPointSpriteBugPresent_
bool IsPointSpriteBugPresent_
Definition: vtkEGLRenderWindow.h:210
vtkEGLRenderWindow::GetGenericContext
virtual void * GetGenericContext()
vtkEGLRenderWindow::DestroyWindow
void DestroyWindow()
Destroy a not-off-screen window.
vtkEGLRenderWindow::vtkEGLRenderWindow
vtkEGLRenderWindow()
vtkEGLRenderWindow::PrefFullScreen
virtual void PrefFullScreen(void)
Set the preferred window size to full screen.
vtkOpenGLRenderWindow
OpenGL rendering window.
Definition: vtkOpenGLRenderWindow.h:42
vtkEGLRenderWindow::Render
void Render()
This computes the size of the render window before calling the supper classes render.
vtkEGLRenderWindow::GetOffScreenRendering
virtual int GetOffScreenRendering()
vtkEGLRenderWindow::GetScreenSize
virtual int * GetScreenSize()
Get the current size of the screen in pixels.
vtkEGLRenderWindow::GetEGLSurfaceSize
void GetEGLSurfaceSize(int *width, int *height)
Returns the width and height of the allocated EGL surface.
vtkEGLRenderWindow::~vtkEGLRenderWindow
~vtkEGLRenderWindow()