00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkOSOpenGLRenderWindow.h,v $ 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00031 #ifndef __vtkOSOpenGLRenderWindow_h 00032 #define __vtkOSOpenGLRenderWindow_h 00033 00034 #include "vtkOpenGLRenderWindow.h" 00035 00036 class vtkIdList; 00037 class vtkOSOpenGLRenderWindowInternal; 00038 00039 class VTK_RENDERING_EXPORT vtkOSOpenGLRenderWindow : public vtkOpenGLRenderWindow 00040 { 00041 public: 00042 static vtkOSOpenGLRenderWindow *New(); 00043 vtkTypeRevisionMacro(vtkOSOpenGLRenderWindow,vtkOpenGLRenderWindow); 00044 void PrintSelf(ostream& os, vtkIndent indent); 00045 00047 virtual void Start(void); 00048 00050 virtual void Frame(void); 00051 00053 virtual void WindowInitialize(void); 00054 00059 virtual void Initialize(void); 00060 00065 virtual void Finalize(void); 00066 00068 virtual void SetFullScreen(int); 00069 00071 00072 virtual void SetSize(int x,int y); 00073 virtual void SetSize(int a[2]) {this->SetSize(a[0], a[1]);}; 00075 00077 virtual int *GetScreenSize(); 00078 00080 virtual int *GetPosition(); 00081 00083 00084 void SetPosition(int x, int y); 00085 void SetPosition(int a[2]) {this->SetPosition(a[0], a[1]);}; 00087 00092 virtual void SetStereoCapableWindow(int capable); 00093 00095 void MakeCurrent(); 00096 00100 void SetForceMakeCurrent(); 00101 00103 const char *ReportCapabilities(); 00104 00106 int SupportsOpenGL(); 00107 00109 int IsDirect(); 00110 00112 virtual void WindowRemap(void); 00113 00115 00116 virtual void *GetGenericDisplayId() {return 0;} 00117 virtual void *GetGenericWindowId(); 00118 virtual void *GetGenericParentId() {return 0;} 00119 virtual void *GetGenericContext(); 00120 virtual void *GetGenericDrawable() {return 0;} 00122 00125 void SetDisplayId(void *) {} 00126 00128 void SetParentId(void *); 00129 00131 void SetWindowId(void *); 00132 00135 void SetNextWindowId(void *); 00136 00137 void SetWindowName(const char *); 00138 00140 00142 void HideCursor() {} 00143 void ShowCursor() {} 00145 00147 virtual void SetCurrentCursor(int); 00148 00152 virtual int GetEventPending(); 00153 00155 void SetWindowInfo(char *info); 00156 00158 void SetNextWindowInfo(char *info); 00159 00161 void SetParentInfo(char *info); 00162 00164 void SetOffScreenRendering(int i); 00165 00166 protected: 00167 vtkOSOpenGLRenderWindow(); 00168 ~vtkOSOpenGLRenderWindow(); 00169 00170 vtkOSOpenGLRenderWindowInternal *Internal; 00171 00172 int OwnWindow; 00173 int OwnDisplay; 00174 int ScreenSize[2]; 00175 int CursorHidden; 00176 int ForceMakeCurrent; 00177 char *Capabilities; 00178 00179 void CreateAWindow(); 00180 void DestroyWindow(); 00181 void CreateOffScreenWindow(int width, int height); 00182 void DestroyOffScreenWindow(); 00183 void ResizeOffScreenWindow(int width, int height); 00184 00185 00186 private: 00187 vtkOSOpenGLRenderWindow(const vtkOSOpenGLRenderWindow&); // Not implemented. 00188 void operator=(const vtkOSOpenGLRenderWindow&); // Not implemented. 00189 }; 00190 00191 00192 00193 #endif