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 =========================================================================*/
24 #ifndef vtkEGLRenderWindow_h
25 #define vtkEGLRenderWindow_h
26 
27 #include "vtkRenderingOpenGL2Module.h" // For export macro
28 #include "vtkOpenGLRenderWindow.h"
29 
30 #include <EGL/egl.h> // required for EGL members
31 
32 class vtkIdList;
33 
34 class VTKRENDERINGOPENGL2_EXPORT vtkEGLRenderWindow : public vtkOpenGLRenderWindow
35 {
36 public:
39  void PrintSelf(ostream& os, vtkIndent indent);
40 
42  virtual void Start(void);
43 
45  virtual void Frame(void);
46 
48  virtual void WindowInitialize(void);
49 
54  virtual void Initialize(void);
55 
60  virtual void Finalize(void);
61 
63  virtual void SetFullScreen(int);
64 
66  virtual void WindowRemap(void);
67 
69  virtual void PrefFullScreen(void);
70 
72 
73  virtual void SetSize(int,int);
74  virtual void SetSize(int a[2]) {this->SetSize(a[0], a[1]);}
76 
81  virtual void SetStereoCapableWindow(int capable);
82 
84  void MakeCurrent();
85 
88  virtual bool IsCurrent();
89 
92 
94  int IsDirect() { return 1;};
95 
97  virtual int *GetScreenSize();
98 
100  virtual int *GetPosition();
101 
103 
104  virtual void SetDisplayId(void *) {};
105  virtual void SetWindowId(void *window) { this->Window = (ANativeWindow *)window;};
106  virtual void SetNextWindowId(void *) {};
107  virtual void SetParentId(void *) {};
108  virtual void *GetGenericDisplayId() { return this->Display; };
109  virtual void *GetGenericWindowId() {};
110  virtual void *GetGenericParentId() {};
111  virtual void *GetGenericContext() { return this->Context; };
112  virtual void *GetGenericDrawable() {};
113  virtual void SetWindowInfo(char *);
114  virtual void SetNextWindowInfo(char *) {};
115  virtual void SetParentInfo(char *) {};
117 
118  void SetWindowName(const char *);
119 
121 
122  void SetPosition(int,int);
123  void SetPosition(int a[2]) {this->SetPosition(a[0], a[1]);};
125 
127 
129  void HideCursor();
130  void ShowCursor();
132 
135  void Render();
136 
139 
144  virtual int GetEventPending() { return 0;};
145 
146  int GetOwnWindow() { return this->OwnWindow; };
147 
148 protected:
151 
152  ANativeWindow *Window;
153  EGLDisplay Display;
154  EGLSurface Surface;
155  EGLContext Context;
156  int ScreenSize[2];
158 
164 
165 private:
166  vtkEGLRenderWindow(const vtkEGLRenderWindow&); // Not implemented.
167  void operator=(const vtkEGLRenderWindow&); // Not implemented.
168 };
169 
170 
171 
172 #endif
vtkEGLRenderWindow::DestroyOffScreenWindow
void DestroyOffScreenWindow()
vtkEGLRenderWindow
OpenGL rendering window.
Definition: vtkEGLRenderWindow.h:35
vtkEGLRenderWindow::Initialize
virtual void Initialize(void)
vtkEGLRenderWindow::GetOwnWindow
int GetOwnWindow()
Definition: vtkEGLRenderWindow.h:146
vtkEGLRenderWindow::GetGenericDisplayId
virtual void * GetGenericDisplayId()
Definition: vtkEGLRenderWindow.h:108
vtkEGLRenderWindow::WindowInitialize
virtual void WindowInitialize(void)
vtkEGLRenderWindow::SetWindowId
virtual void SetWindowId(void *window)
Definition: vtkEGLRenderWindow.h:105
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkEGLRenderWindow::IsDirect
int IsDirect()
Definition: vtkEGLRenderWindow.h:94
vtkEGLRenderWindow::HideCursor
void HideCursor()
vtkEGLRenderWindow::SetFullScreen
virtual void SetFullScreen(int)
vtkEGLRenderWindow::SetOffScreenRendering
void SetOffScreenRendering(int i)
vtkEGLRenderWindow::Display
EGLDisplay Display
Definition: vtkEGLRenderWindow.h:153
vtkEGLRenderWindow::CreateOffScreenWindow
void CreateOffScreenWindow(int width, int height)
vtkEGLRenderWindow::SetNextWindowId
virtual void SetNextWindowId(void *)
Definition: vtkEGLRenderWindow.h:106
vtkEGLRenderWindow::WindowRemap
virtual void WindowRemap(void)
vtkEGLRenderWindow::GetGenericParentId
virtual void * GetGenericParentId()
Definition: vtkEGLRenderWindow.h:110
vtkEGLRenderWindow::New
static vtkEGLRenderWindow * New()
vtkEGLRenderWindow::GetEventPending
virtual int GetEventPending()
Definition: vtkEGLRenderWindow.h:144
vtkOpenGLRenderWindow.h
vtkEGLRenderWindow::SetParentInfo
virtual void SetParentInfo(char *)
Definition: vtkEGLRenderWindow.h:115
vtkEGLRenderWindow::SetDisplayId
virtual void SetDisplayId(void *)
Definition: vtkEGLRenderWindow.h:104
vtkEGLRenderWindow::SetStereoCapableWindow
virtual void SetStereoCapableWindow(int capable)
vtkEGLRenderWindow::ResizeOffScreenWindow
void ResizeOffScreenWindow(int width, int height)
vtkEGLRenderWindow::SetPosition
void SetPosition(int, int)
vtkEGLRenderWindow::SetSize
virtual void SetSize(int, int)
vtkEGLRenderWindow::Window
ANativeWindow * Window
Definition: vtkEGLRenderWindow.h:152
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkEGLRenderWindow::Start
virtual void Start(void)
vtkIdList
list of point or cell ids
Definition: vtkIdList.h:36
vtkEGLRenderWindow::MakeCurrent
void MakeCurrent()
vtkEGLRenderWindow::IsCurrent
virtual bool IsCurrent()
vtkEGLRenderWindow::Finalize
virtual void Finalize(void)
vtkEGLRenderWindow::SetParentId
virtual void SetParentId(void *)
Definition: vtkEGLRenderWindow.h:107
vtkEGLRenderWindow::SetWindowName
void SetWindowName(const char *)
vtkEGLRenderWindow::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkEGLRenderWindow::Surface
EGLSurface Surface
Definition: vtkEGLRenderWindow.h:154
vtkgl::a
GLboolean GLboolean GLboolean GLboolean a
Definition: vtkgl.h:12312
vtkEGLRenderWindow::GetGenericDrawable
virtual void * GetGenericDrawable()
Definition: vtkEGLRenderWindow.h:112
vtkEGLRenderWindow::SetNextWindowInfo
virtual void SetNextWindowInfo(char *)
Definition: vtkEGLRenderWindow.h:114
vtkEGLRenderWindow::SetPosition
void SetPosition(int a[2])
Definition: vtkEGLRenderWindow.h:123
vtkEGLRenderWindow::Context
EGLContext Context
Definition: vtkEGLRenderWindow.h:155
vtkgl::width
GLint GLint GLsizei width
Definition: vtkgl.h:11316
vtkEGLRenderWindow::SetSize
virtual void SetSize(int a[2])
Definition: vtkEGLRenderWindow.h:74
vtkEGLRenderWindow::ShowCursor
void ShowCursor()
vtkEGLRenderWindow::OwnWindow
int OwnWindow
Definition: vtkEGLRenderWindow.h:157
vtkEGLRenderWindow::Frame
virtual void Frame(void)
vtkEGLRenderWindow::CreateAWindow
void CreateAWindow()
vtkEGLRenderWindow::GetGenericWindowId
virtual void * GetGenericWindowId()
Definition: vtkEGLRenderWindow.h:109
vtkEGLRenderWindow::GetPosition
virtual int * GetPosition()
vtkEGLRenderWindow::SetWindowInfo
virtual void SetWindowInfo(char *)
vtkEGLRenderWindow::GetGenericContext
virtual void * GetGenericContext()
Definition: vtkEGLRenderWindow.h:111
vtkEGLRenderWindow::DestroyWindow
void DestroyWindow()
vtkEGLRenderWindow::vtkEGLRenderWindow
vtkEGLRenderWindow()
vtkEGLRenderWindow::PrefFullScreen
virtual void PrefFullScreen(void)
vtkEGLRenderWindow::SupportsOpenGL
int SupportsOpenGL()
vtkOpenGLRenderWindow
OpenGL rendering window.
Definition: vtkOpenGLRenderWindow.h:41
vtkEGLRenderWindow::Render
void Render()
vtkEGLRenderWindow::GetScreenSize
virtual int * GetScreenSize()
vtkEGLRenderWindow::~vtkEGLRenderWindow
~vtkEGLRenderWindow()
vtkgl::height
GLint GLint GLsizei GLsizei height
Definition: vtkgl.h:11316