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
00051 #ifndef __vtkQuartzRenderWindow_h
00052 #define __vtkQuartzRenderWindow_h
00053
00054 #include <stdlib.h>
00055 #include "vtkRenderWindow.h"
00056 #include "vtkMutexLock.h"
00057 #include <OpenGL/gl.h>
00058 #endif
00059
00060 class vtkIdList;
00061
00062 class VTK_RENDERING_EXPORT vtkQuartzRenderWindow : public vtkRenderWindow
00063 {
00064 public:
00065 static vtkQuartzRenderWindow *New();
00066 vtkTypeMacro(vtkQuartzRenderWindow,vtkRenderWindow);
00067 void PrintSelf(ostream& os, vtkIndent indent);
00068
00070 void Start(void);
00071
00073 void Frame(void);
00074
00076 virtual void WindowConfigure(void);
00077
00079 virtual void WindowInitialize(void);
00080
00082 virtual void Initialize(void);
00083
00085 virtual void SetFullScreen(int);
00086
00088 virtual void WindowRemap(void);
00089
00091 virtual void PrefFullScreen(void);
00092
00094 virtual void SetSize(int,int);
00095
00097 virtual int *GetSize();
00098
00100 virtual void SetPosition(int,int);
00101
00103 virtual int *GetScreenSize();
00104
00106 virtual int *GetPosition();
00107
00110 virtual void SetWindowName(char *);
00111
00113 void SetWindowInfo(void *);
00114
00115
00116 virtual void *GetGenericDisplayId() {return (void *)this->ContextId;};
00117 virtual void *GetGenericWindowId() {return (void *)this->WindowId;};
00118 virtual void *GetGenericContext() {return (void *)this->DeviceContext;};
00119 virtual void SetDisplayId(void *) {};
00120
00122 virtual void *GetWindowId();
00123
00125 virtual void SetWindowId(void *);
00126
00127 void SetContextId(void *);
00128 void SetDeviceContext(void *);
00129
00130
00131
00132
00133 vtkSetMacro(MultiSamples,int);
00134 vtkGetMacro(MultiSamples,int);
00135
00137 virtual void StereoUpdate();
00138
00143 virtual void SetStereoCapableWindow(int capable);
00144
00146
00147 virtual unsigned char *GetPixelData(int x,int y,int x2,int y2,int front);
00148 virtual void SetPixelData(int x,int y,int x2,int y2,unsigned char *,
00149 int front);
00151
00153
00154 virtual float *GetRGBAPixelData(int x,int y,int x2,int y2,int front);
00155 virtual void SetRGBAPixelData(int x,int y,int x2,int y2,float *,int front,
00156 int blend=0);
00157 virtual void ReleaseRGBAPixelData(float *data);
00159
00161
00162 virtual float *GetZbufferData( int x1, int y1, int x2, int y2 );
00163 virtual void SetZbufferData( int x1, int y1, int x2, int y2, float *buffer );
00165
00167 void MakeCurrent();
00168
00171 virtual int GetEventPending();
00172
00180 virtual void OpenGLInit();
00181 virtual void SetupPalette(void *hDC);
00182 virtual void SetupPixelFormat(void *hDC, void *dwFlags, int debug,
00183 int bpp=16, int zbpp=16);
00185
00187 void Clean();
00188
00190 void RegisterTextureResource (GLuint id);
00191
00193 int GetDepthBufferSize();
00194
00196
00198 void HideCursor();
00199 void ShowCursor();
00201
00202 void UpdateSizeAndPosition(int xPos, int yPos, int xSize, int ySize);
00203
00204
00205 protected:
00206 vtkQuartzRenderWindow();
00207 ~vtkQuartzRenderWindow();
00208
00209 int ApplicationInitialized;
00210 void *ContextId;
00211 void *DeviceContext;
00212 void *WindowId;
00213 void *WindowController;
00214 int OwnWindow;
00215 int ScreenSize[2];
00216 int MultiSamples;
00217 vtkIdList *TextureResourceIds;
00218
00219
00220
00221
00222
00223
00224
00225 int ScreenMapped;
00226 int ScreenWindowSize[2];
00227 void *ScreenDeviceContext;
00228 int ScreenDoubleBuffer;
00229 void *ScreenContextId;
00230
00231 int CursorHidden;
00232
00233 private:
00234 vtkQuartzRenderWindow(const vtkQuartzRenderWindow&);
00235 void operator=(const vtkQuartzRenderWindow&);
00236 };
00237