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

# Rendering/vtkMesaRenderWindow.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program:   Visualization Toolkit
    00004   Module:    $RCSfile: vtkMesaRenderWindow.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 =========================================================================*/
    00041 #ifndef __vtkMesaRenderWindow_h
    00042 #define __vtkMesaRenderWindow_h
    00043
    00044 #include "vtkRenderWindow.h"
    00045
    00046 #include "MangleMesaInclude/gl_mangle.h" // Needed for GLuint
    00047 #include <MangleMesaInclude/gl.h> // Needed for GLuint
    00048
    00049 class vtkIdList;
    00050
    00051 class VTK_RENDERING_EXPORT vtkMesaRenderWindow : public vtkRenderWindow
    00052 {
    00053 protected:
    00054   int MultiSamples;
    00055   long OldMonitorSetting;
    00056
    00057 public:
    00058   vtkTypeRevisionMacro(vtkMesaRenderWindow,vtkRenderWindow);
    00059   void PrintSelf(ostream& os, vtkIndent indent);
    00060
    00062
    00063   static void SetGlobalMaximumNumberOfMultiSamples(int val);
    00064   static int  GetGlobalMaximumNumberOfMultiSamples();
    00066
    00068
    00070   vtkSetMacro(MultiSamples,int);
    00071   vtkGetMacro(MultiSamples,int);
    00073
    00075   virtual void StereoUpdate();
    00076
    00078
    00079   virtual unsigned char *GetPixelData(int x,int y,int x2,int y2,int front);
    00080   virtual int GetPixelData(int x,int y,int x2,int y2, int front,
    00081                            vtkUnsignedCharArray*);
    00082   virtual int SetPixelData(int x,int y,int x2,int y2,unsigned char *,
    00083                            int front);
    00084   virtual int SetPixelData(int x,int y,int x2,int y2, vtkUnsignedCharArray*,
    00085                            int front);
    00087
    00089
    00090   virtual float *GetRGBAPixelData(int x,int y,int x2,int y2,int front);
    00091   virtual int GetRGBAPixelData(int x,int y,int x2,int y2, int front,
    00092                                vtkFloatArray* data);
    00093   virtual int SetRGBAPixelData(int x,int y,int x2,int y2,float *,int front,
    00094                                 int blend=0);
    00095   virtual int SetRGBAPixelData(int x,int y,int x2,int y2, vtkFloatArray*,
    00096                                 int front, int blend=0);
    00097   virtual void ReleaseRGBAPixelData(float *data);
    00098   virtual unsigned char *GetRGBACharPixelData(int x,int y,int x2,int y2,
    00099                                               int front);
    00100   virtual int GetRGBACharPixelData(int x,int y,int x2,int y2, int front,
    00101                                    vtkUnsignedCharArray* data);
    00102   virtual int SetRGBACharPixelData(int x,int y,int x2,int y2,unsigned char *,
    00103                                     int front, int blend=0);
    00104   virtual int SetRGBACharPixelData(int x,int y,int x2,int y2,
    00105                                    vtkUnsignedCharArray *,
    00106                                    int front, int blend=0);
    00108
    00110
    00111   virtual float *GetZbufferData( int x1, int y1, int x2, int y2 );
    00112   virtual int GetZbufferData( int x1, int y1, int x2, int y2,
    00113                               vtkFloatArray* z );
    00114   virtual int SetZbufferData( int x1, int y1, int x2, int y2, float *buffer );
    00115   virtual int SetZbufferData( int x1, int y1, int x2, int y2,
    00116                               vtkFloatArray *buffer );
    00118
    00120   void MakeCurrent() = 0;
    00121
    00123   void RegisterTextureResource (GLuint id);
    00124
    00126   int GetDepthBufferSize();
    00127
    00129   virtual void OpenGLInit();
    00130
    00131 protected:
    00132   vtkMesaRenderWindow();
    00133   ~vtkMesaRenderWindow();
    00134
    00135   vtkIdList *TextureResourceIds;
    00136
    00137   int GetPixelData(int x,int y,int x2,int y2,int front, unsigned char* data);
    00138   int GetZbufferData( int x1, int y1, int x2, int y2, float* z );
    00139   int GetRGBAPixelData(int x,int y,int x2,int y2, int front, float* data);
    00140   int GetRGBACharPixelData(int x,int y,int x2,int y2, int front,
    00141                            unsigned char* data);
    00142
    00143 private:
    00144   vtkMesaRenderWindow(const vtkMesaRenderWindow&);  // Not implemented.
    00145   void operator=(const vtkMesaRenderWindow&);  // Not implemented.
    00146 };
    00147
    00148 #endif