00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00052 #ifndef __vtkOpenGLRenderWindow_h
00053 #define __vtkOpenGLRenderWindow_h
00054
00055 #include <stdlib.h>
00056 #include "vtkRenderWindow.h"
00057 #ifdef __APPLE__
00058 #include <OpenGL/gl.h>
00059 #else
00060 #include <GL/gl.h>
00061 #endif
00062
00063 class vtkIdList;
00064
00065 class VTK_RENDERING_EXPORT vtkOpenGLRenderWindow : public vtkRenderWindow
00066 {
00067 protected:
00068 int MultiSamples;
00069 long OldMonitorSetting;
00070
00071 public:
00072 vtkTypeMacro(vtkOpenGLRenderWindow,vtkRenderWindow);
00073 void PrintSelf(ostream& os, vtkIndent indent);
00074
00076
00077 static void SetGlobalMaximumNumberOfMultiSamples(int val);
00078 static int GetGlobalMaximumNumberOfMultiSamples();
00080
00082
00084 vtkSetMacro(MultiSamples,int);
00085 vtkGetMacro(MultiSamples,int);
00087
00089 virtual void StereoUpdate();
00090
00092
00093 virtual unsigned char *GetPixelData(int x,int y,int x2,int y2,int front);
00094 virtual void SetPixelData(int x,int y,int x2,int y2,unsigned char *,
00095 int front);
00097
00099
00100 virtual float *GetRGBAPixelData(int x,int y,int x2,int y2,int front);
00101 virtual void SetRGBAPixelData(int x,int y,int x2,int y2,float *,int front,
00102 int blend=0);
00103 virtual void ReleaseRGBAPixelData(float *data);
00104 virtual unsigned char *GetRGBACharPixelData(int x,int y,int x2,int y2,
00105 int front);
00106 virtual void SetRGBACharPixelData(int x,int y,int x2,int y2,unsigned char *,
00107 int front, int blend=0);
00109
00111
00112 virtual float *GetZbufferData( int x1, int y1, int x2, int y2 );
00113 virtual void SetZbufferData( int x1, int y1, int x2, int y2, float *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 vtkOpenGLRenderWindow();
00130 ~vtkOpenGLRenderWindow();
00131
00132 vtkIdList *TextureResourceIds;
00133 private:
00134 vtkOpenGLRenderWindow(const vtkOpenGLRenderWindow&);
00135 void operator=(const vtkOpenGLRenderWindow&);
00136 };
00137
00138 #endif