Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

dox/Rendering/vtkOpenGLRenderWindow.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkOpenGLRenderWindow.h,v $ 00005 Language: C++ 00006 00007 Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 00008 All rights reserved. 00009 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00010 00011 This software is distributed WITHOUT ANY WARRANTY; without even 00012 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00013 PURPOSE. See the above copyright notice for more information. 00014 00015 =========================================================================*/ 00028 #ifndef __vtkOpenGLRenderWindow_h 00029 #define __vtkOpenGLRenderWindow_h 00030 00031 #include "vtkRenderWindow.h" 00032 00033 #if defined(__APPLE__) && (defined(VTK_USE_CARBON) || defined(VTK_USE_COCOA)) 00034 #include <OpenGL/gl.h> // Needed for GLuint 00035 #else 00036 #include <GL/gl.h> // Needed for GLuint 00037 #endif 00038 00039 class vtkIdList; 00040 00041 class VTK_RENDERING_EXPORT vtkOpenGLRenderWindow : public vtkRenderWindow 00042 { 00043 protected: 00044 int MultiSamples; 00045 long OldMonitorSetting; 00046 00047 public: 00048 vtkTypeRevisionMacro(vtkOpenGLRenderWindow,vtkRenderWindow); 00049 void PrintSelf(ostream& os, vtkIndent indent); 00050 00052 00053 static void SetGlobalMaximumNumberOfMultiSamples(int val); 00054 static int GetGlobalMaximumNumberOfMultiSamples(); 00056 00058 00060 vtkSetMacro(MultiSamples,int); 00061 vtkGetMacro(MultiSamples,int); 00063 00065 virtual void StereoUpdate(); 00066 00068 00069 virtual unsigned char *GetPixelData(int x,int y,int x2,int y2,int front); 00070 virtual int GetPixelData(int x,int y,int x2,int y2, int front, 00071 vtkUnsignedCharArray*); 00072 virtual int SetPixelData(int x,int y,int x2,int y2,unsigned char *, 00073 int front); 00074 virtual int SetPixelData(int x,int y,int x2,int y2, vtkUnsignedCharArray*, 00075 int front); 00077 00079 00080 virtual float *GetRGBAPixelData(int x,int y,int x2,int y2,int front); 00081 virtual int GetRGBAPixelData(int x,int y,int x2,int y2, int front, 00082 vtkFloatArray* data); 00083 virtual int SetRGBAPixelData(int x,int y,int x2,int y2,float *,int front, 00084 int blend=0); 00085 virtual int SetRGBAPixelData(int x,int y,int x2,int y2, vtkFloatArray*, 00086 int front, int blend=0); 00087 virtual void ReleaseRGBAPixelData(float *data); 00088 virtual unsigned char *GetRGBACharPixelData(int x,int y,int x2,int y2, 00089 int front); 00090 virtual int GetRGBACharPixelData(int x,int y,int x2,int y2, int front, 00091 vtkUnsignedCharArray* data); 00092 virtual int SetRGBACharPixelData(int x,int y,int x2,int y2,unsigned char *, 00093 int front, int blend=0); 00094 virtual int SetRGBACharPixelData(int x,int y,int x2,int y2, 00095 vtkUnsignedCharArray *, 00096 int front, int blend=0); 00098 00100 00101 virtual float *GetZbufferData( int x1, int y1, int x2, int y2 ); 00102 virtual int GetZbufferData( int x1, int y1, int x2, int y2, 00103 vtkFloatArray* z ); 00104 virtual int SetZbufferData( int x1, int y1, int x2, int y2, float *buffer ); 00105 virtual int SetZbufferData( int x1, int y1, int x2, int y2, 00106 vtkFloatArray *buffer ); 00108 00110 void MakeCurrent() = 0; 00111 00113 void RegisterTextureResource (GLuint id); 00114 00116 int GetDepthBufferSize(); 00117 00119 virtual void OpenGLInit(); 00120 00121 protected: 00122 vtkOpenGLRenderWindow(); 00123 ~vtkOpenGLRenderWindow(); 00124 00125 vtkIdList *TextureResourceIds; 00126 00127 int GetPixelData(int x,int y,int x2,int y2,int front, unsigned char* data); 00128 int GetZbufferData( int x1, int y1, int x2, int y2, float* z ); 00129 int GetRGBAPixelData(int x,int y,int x2,int y2, int front, float* data); 00130 int GetRGBACharPixelData(int x,int y,int x2,int y2, int front, 00131 unsigned char* data); 00132 00133 private: 00134 vtkOpenGLRenderWindow(const vtkOpenGLRenderWindow&); // Not implemented. 00135 void operator=(const vtkOpenGLRenderWindow&); // Not implemented. 00136 }; 00137 00138 #endif