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

vtkOpenGLRenderWindow.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkOpenGLRenderWindow.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 =========================================================================*/
00024 #ifndef __vtkOpenGLRenderWindow_h
00025 #define __vtkOpenGLRenderWindow_h
00026 
00027 #include "vtkRenderWindow.h"
00028 
00029 #include "vtkOpenGL.h" // Needed for GLuint.
00030 
00031 class vtkIdList;
00032 
00033 class VTK_RENDERING_EXPORT vtkOpenGLRenderWindow : public vtkRenderWindow
00034 {
00035 protected:
00036   int MultiSamples;
00037   long OldMonitorSetting;
00038 
00039 public:
00040   vtkTypeRevisionMacro(vtkOpenGLRenderWindow,vtkRenderWindow);
00041   void PrintSelf(ostream& os, vtkIndent indent);
00042 
00044 
00045   static void SetGlobalMaximumNumberOfMultiSamples(int val);
00046   static int  GetGlobalMaximumNumberOfMultiSamples();
00048 
00050 
00052   vtkSetMacro(MultiSamples,int);
00053   vtkGetMacro(MultiSamples,int);
00055 
00057   virtual void StereoUpdate();
00058 
00060 
00061   virtual unsigned char *GetPixelData(int x,int y,int x2,int y2,int front);
00062   virtual int GetPixelData(int x,int y,int x2,int y2, int front,
00063                            vtkUnsignedCharArray*);
00064   virtual int SetPixelData(int x,int y,int x2,int y2,unsigned char *,
00065                            int front);
00066   virtual int SetPixelData(int x,int y,int x2,int y2, vtkUnsignedCharArray*,
00067                            int front);
00069 
00071 
00072   virtual float *GetRGBAPixelData(int x,int y,int x2,int y2,int front);
00073   virtual int GetRGBAPixelData(int x,int y,int x2,int y2, int front,
00074                                vtkFloatArray* data);
00075   virtual int SetRGBAPixelData(int x,int y,int x2,int y2,float *,int front,
00076                                int blend=0);
00077   virtual int SetRGBAPixelData(int x,int y,int x2,int y2, vtkFloatArray*,
00078                                int front, int blend=0);
00079   virtual void ReleaseRGBAPixelData(float *data);
00080   virtual unsigned char *GetRGBACharPixelData(int x,int y,int x2,int y2,
00081                                               int front);
00082   virtual int GetRGBACharPixelData(int x,int y,int x2,int y2, int front,
00083                                    vtkUnsignedCharArray* data);
00084   virtual int SetRGBACharPixelData(int x,int y,int x2,int y2,unsigned char *,
00085                                    int front, int blend=0);  
00086   virtual int SetRGBACharPixelData(int x,int y,int x2,int y2,
00087                                    vtkUnsignedCharArray *,
00088                                    int front, int blend=0);  
00090 
00092 
00093   virtual float *GetZbufferData( int x1, int y1, int x2, int y2 );
00094   virtual int GetZbufferData( int x1, int y1, int x2, int y2, float* z );
00095   virtual int GetZbufferData( int x1, int y1, int x2, int y2,
00096                               vtkFloatArray* z );
00097   virtual int SetZbufferData( int x1, int y1, int x2, int y2, float *buffer );
00098   virtual int SetZbufferData( int x1, int y1, int x2, int y2,
00099                               vtkFloatArray *buffer );
00101 
00103   void MakeCurrent() = 0;
00104   
00106   void RegisterTextureResource (GLuint id);
00107 
00109   int GetDepthBufferSize();
00110   
00112   virtual void OpenGLInit();
00113 
00114 protected:
00115   vtkOpenGLRenderWindow();
00116   ~vtkOpenGLRenderWindow();
00117 
00118   vtkIdList *TextureResourceIds;
00119 
00120   int GetPixelData(int x,int y,int x2,int y2,int front, unsigned char* data);
00121   int GetRGBAPixelData(int x,int y,int x2,int y2, int front, float* data);
00122   int GetRGBACharPixelData(int x,int y,int x2,int y2, int front,
00123                            unsigned char* data);
00124 
00125 private:
00126   vtkOpenGLRenderWindow(const vtkOpenGLRenderWindow&);  // Not implemented.
00127   void operator=(const vtkOpenGLRenderWindow&);  // Not implemented.
00128 };
00129 
00130 #endif

Generated on Mon Jan 21 23:07:35 2008 for VTK by  doxygen 1.4.3-20050530