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:
37  static vtkEGLRenderWindow *New();
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 
91  int SupportsOpenGL();
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 
138  void SetOffScreenRendering(int i);
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 
159  void CreateAWindow();
160  void DestroyWindow();
161  void CreateOffScreenWindow(int width, int height);
162  void DestroyOffScreenWindow();
163  void ResizeOffScreenWindow(int width, int height);
164 
165 private:
166  vtkEGLRenderWindow(const vtkEGLRenderWindow&); // Not implemented.
167  void operator=(const vtkEGLRenderWindow&); // Not implemented.
168 };
169 
170 
171 
172 #endif
OpenGL rendering window.
virtual void * GetGenericContext()
virtual void SetOffScreenRendering(int)
virtual void SetDisplayId(void *)
virtual void Finalize()=0
virtual void SetWindowInfo(char *)=0
virtual void * GetGenericDrawable()
virtual void WindowRemap()=0
virtual void SetNextWindowId(void *)
void PrintSelf(ostream &os, vtkIndent indent)
virtual void HideCursor()=0
virtual void SetNextWindowInfo(char *)
void SetPosition(int a[2])
static vtkRenderWindow * New()
virtual int * GetScreenSize()=0
virtual void * GetGenericWindowId()
virtual void SetParentInfo(char *)
virtual void SetFullScreen(int)=0
virtual void SetSize(int, int)
virtual void * GetGenericDisplayId()
virtual void SetWindowId(void *window)
virtual void SetStereoCapableWindow(int capable)
virtual int SupportsOpenGL()
virtual bool IsCurrent()=0
virtual void SetParentId(void *)
a simple class to control print indentation
Definition: vtkIndent.h:38
virtual void DestroyWindow()=0
list of point or cell ids
Definition: vtkIdList.h:35
virtual void MakeCurrent()=0
virtual void SetSize(int a[2])
virtual int * GetPosition()
virtual void Frame()=0
virtual int GetEventPending()
ANativeWindow * Window
virtual void Start()=0
virtual void SetWindowName(const char *)
virtual void SetPosition(int, int)
virtual void CreateAWindow()=0
OpenGL rendering window.
virtual void ShowCursor()=0
virtual void * GetGenericParentId()