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