VTK
vtkXOpenGLRenderDevice.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4 
5  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
6  All rights reserved.
7  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
8 
9  This software is distributed WITHOUT ANY WARRANTY; without even
10  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11  PURPOSE. See the above copyright notice for more information.
12 
13 =========================================================================*/
14 #ifndef vtkXOpenGLRenderDevice_h
15 #define vtkXOpenGLRenderDevice_h
16 
18 #include "vtkRenderingOpenGL2Module.h" // For export macro
19 #include <X11/Xutil.h> // Needed for X types used in the public interface
20 
22 
23 class VTKRENDERINGOPENGL2_EXPORT vtkXOpenGLRenderDevice
25 {
26 public:
28  void PrintSelf(ostream& os, vtkIndent indent);
29 
30  static vtkXOpenGLRenderDevice* New();
31 
32  virtual bool CreateNewWindow(const vtkRecti &geometry, const std::string &name);
33 
34  virtual void MakeCurrent();
35 
36 protected:
39 
40  Window ParentId;
41  Window WindowId;
42  Display *DisplayId;
43  Colormap ColorMap;
44 
45  bool OwnDisplay; // Do we own the display?
46  bool OwnWindow; // Do we own the window?
47  bool OffScreenRendering; // Is this for off screen rendering?
48  bool Mapped;
49 
50  double Borders;
51 
52 private:
53  vtkXOpenGLRenderDevice(const vtkXOpenGLRenderDevice&); // Not implemented.
54  void operator=(const vtkXOpenGLRenderDevice&); // Not implemented.
55 
56  class Private;
57  Private *Internal;
58 
59  friend class vtkXInteractionDevice;
60 };
61 
62 #endif
virtual bool CreateNewWindow(const vtkRecti &geometry, const std::string &name)=0
Create a window with the desired geometry.
static vtkAbstractRenderDevice * New()
Make a new device, this class is abstract and one of its derived forms will be returned, or NULL if no override has been provided.
virtual void MakeCurrent()=0
Make the context current so that it can be used by OpenGL.
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
a simple class to control print indentation
Definition: vtkIndent.h:38
void PrintSelf(ostream &os, vtkIndent indent)