dox/Rendering/vtkOpenGLRenderWindow.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00028
#ifndef __vtkOpenGLRenderWindow_h
00029
#define __vtkOpenGLRenderWindow_h
00030
00031
#include "vtkRenderWindow.h"
00032
00033
#if defined(__APPLE__) && (defined(VTK_USE_CARBON) || defined(VTK_USE_COCOA))
00034
#include <OpenGL/gl.h>
00035
#else
00036
#include <GL/gl.h>
00037
#endif
00038
00039
class vtkIdList;
00040
00041 class VTK_RENDERING_EXPORT vtkOpenGLRenderWindow :
public vtkRenderWindow
00042 {
00043
protected:
00044 int MultiSamples;
00045 long OldMonitorSetting;
00046
00047
public:
00048 vtkTypeRevisionMacro(vtkOpenGLRenderWindow,
vtkRenderWindow);
00049
void PrintSelf(ostream& os,
vtkIndent indent);
00050
00052
00053
static void SetGlobalMaximumNumberOfMultiSamples(
int val);
00054
static int GetGlobalMaximumNumberOfMultiSamples();
00056
00058
00060 vtkSetMacro(MultiSamples,
int);
00061 vtkGetMacro(MultiSamples,
int);
00063
00065
virtual void StereoUpdate();
00066
00068
00069
virtual unsigned char *
GetPixelData(
int x,
int y,
int x2,
int y2,
int front);
00070
virtual int GetPixelData(
int x,
int y,
int x2,
int y2,
int front,
00071
vtkUnsignedCharArray*);
00072
virtual int SetPixelData(
int x,
int y,
int x2,
int y2,
unsigned char *,
00073
int front);
00074
virtual int SetPixelData(
int x,
int y,
int x2,
int y2,
vtkUnsignedCharArray*,
00075
int front);
00077
00079
00080
virtual float *
GetRGBAPixelData(
int x,
int y,
int x2,
int y2,
int front);
00081
virtual int GetRGBAPixelData(
int x,
int y,
int x2,
int y2,
int front,
00082
vtkFloatArray* data);
00083
virtual int SetRGBAPixelData(
int x,
int y,
int x2,
int y2,
float *,
int front,
00084
int blend=0);
00085
virtual int SetRGBAPixelData(
int x,
int y,
int x2,
int y2,
vtkFloatArray*,
00086
int front,
int blend=0);
00087
virtual void ReleaseRGBAPixelData(
float *data);
00088
virtual unsigned char *
GetRGBACharPixelData(
int x,
int y,
int x2,
int y2,
00089
int front);
00090
virtual int GetRGBACharPixelData(
int x,
int y,
int x2,
int y2,
int front,
00091
vtkUnsignedCharArray* data);
00092
virtual int SetRGBACharPixelData(
int x,
int y,
int x2,
int y2,
unsigned char *,
00093
int front,
int blend=0);
00094
virtual int SetRGBACharPixelData(
int x,
int y,
int x2,
int y2,
00095
vtkUnsignedCharArray *,
00096
int front,
int blend=0);
00098
00100
00101
virtual float *
GetZbufferData(
int x1,
int y1,
int x2,
int y2 );
00102
virtual int GetZbufferData(
int x1,
int y1,
int x2,
int y2,
00103
vtkFloatArray* z );
00104
virtual int SetZbufferData(
int x1,
int y1,
int x2,
int y2,
float *buffer );
00105
virtual int SetZbufferData(
int x1,
int y1,
int x2,
int y2,
00106
vtkFloatArray *buffer );
00108
00110
void MakeCurrent() = 0;
00111
00113
void RegisterTextureResource (GLuint
id);
00114
00116
int GetDepthBufferSize();
00117
00119
virtual void OpenGLInit();
00120
00121
protected:
00122 vtkOpenGLRenderWindow();
00123 ~vtkOpenGLRenderWindow();
00124
00125 vtkIdList *TextureResourceIds;
00126
00127
int GetPixelData(
int x,
int y,
int x2,
int y2,
int front,
unsigned char* data);
00128
int GetZbufferData(
int x1,
int y1,
int x2,
int y2,
float* z );
00129
int GetRGBAPixelData(
int x,
int y,
int x2,
int y2,
int front,
float* data);
00130
int GetRGBACharPixelData(
int x,
int y,
int x2,
int y2,
int front,
00131
unsigned char* data);
00132
00133
private:
00134 vtkOpenGLRenderWindow(
const vtkOpenGLRenderWindow&);
00135
void operator=(
const vtkOpenGLRenderWindow&);
00136 };
00137
00138
#endif