00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00034 #ifndef __vtkMesaRenderWindow_h
00035 #define __vtkMesaRenderWindow_h
00036
00037 #include "vtkRenderWindow.h"
00038
00039 #include "MangleMesaInclude/gl_mangle.h"
00040 #include <MangleMesaInclude/gl.h>
00041
00042 class vtkIdList;
00043
00044 class VTK_RENDERING_EXPORT vtkMesaRenderWindow : public vtkRenderWindow
00045 {
00046 protected:
00047 int MultiSamples;
00048 long OldMonitorSetting;
00049
00050 public:
00051 vtkTypeRevisionMacro(vtkMesaRenderWindow,vtkRenderWindow);
00052 void PrintSelf(ostream& os, vtkIndent indent);
00053
00055
00056 static void SetGlobalMaximumNumberOfMultiSamples(int val);
00057 static int GetGlobalMaximumNumberOfMultiSamples();
00059
00061
00063 vtkSetMacro(MultiSamples,int);
00064 vtkGetMacro(MultiSamples,int);
00066
00068 virtual void StereoUpdate();
00069
00071
00072 virtual unsigned char *GetPixelData(int x,int y,int x2,int y2,int front);
00073 virtual int GetPixelData(int x,int y,int x2,int y2, int front,
00074 vtkUnsignedCharArray*);
00075 virtual int SetPixelData(int x,int y,int x2,int y2,unsigned char *,
00076 int front);
00077 virtual int SetPixelData(int x,int y,int x2,int y2, vtkUnsignedCharArray*,
00078 int front);
00080
00082
00083 virtual float *GetRGBAPixelData(int x,int y,int x2,int y2,int front);
00084 virtual int GetRGBAPixelData(int x,int y,int x2,int y2, int front,
00085 vtkFloatArray* data);
00086 virtual int SetRGBAPixelData(int x,int y,int x2,int y2,float *,int front,
00087 int blend=0);
00088 virtual int SetRGBAPixelData(int x,int y,int x2,int y2, vtkFloatArray*,
00089 int front, int blend=0);
00090 virtual void ReleaseRGBAPixelData(float *data);
00091 virtual unsigned char *GetRGBACharPixelData(int x,int y,int x2,int y2,
00092 int front);
00093 virtual int GetRGBACharPixelData(int x,int y,int x2,int y2, int front,
00094 vtkUnsignedCharArray* data);
00095 virtual int SetRGBACharPixelData(int x,int y,int x2,int y2,unsigned char *,
00096 int front, int blend=0);
00097 virtual int SetRGBACharPixelData(int x,int y,int x2,int y2,
00098 vtkUnsignedCharArray *,
00099 int front, int blend=0);
00101
00103
00104 virtual float *GetZbufferData( int x1, int y1, int x2, int y2 );
00105 virtual int GetZbufferData( int x1, int y1, int x2, int y2,
00106 vtkFloatArray* z );
00107 virtual int SetZbufferData( int x1, int y1, int x2, int y2, float *buffer );
00108 virtual int SetZbufferData( int x1, int y1, int x2, int y2,
00109 vtkFloatArray *buffer );
00111
00113 void MakeCurrent() = 0;
00114
00116 void RegisterTextureResource (GLuint id);
00117
00119 int GetDepthBufferSize();
00120
00122 virtual void OpenGLInit();
00123
00124 protected:
00125 vtkMesaRenderWindow();
00126 ~vtkMesaRenderWindow();
00127
00128 vtkIdList *TextureResourceIds;
00129
00130 int GetPixelData(int x,int y,int x2,int y2,int front, unsigned char* data);
00131 int GetZbufferData( int x1, int y1, int x2, int y2, float* z );
00132 int GetRGBAPixelData(int x,int y,int x2,int y2, int front, float* data);
00133 int GetRGBACharPixelData(int x,int y,int x2,int y2, int front,
00134 unsigned char* data);
00135
00136 private:
00137 vtkMesaRenderWindow(const vtkMesaRenderWindow&);
00138 void operator=(const vtkMesaRenderWindow&);
00139 };
00140
00141 #endif