49 #ifndef __vtkRenderWindow_h
50 #define __vtkRenderWindow_h
62 #define VTK_STEREO_CRYSTAL_EYES 1
63 #define VTK_STEREO_RED_BLUE 2
64 #define VTK_STEREO_INTERLACED 3
65 #define VTK_STEREO_LEFT 4
66 #define VTK_STEREO_RIGHT 5
67 #define VTK_STEREO_DRESDEN 6
68 #define VTK_STEREO_ANAGLYPH 7
69 #define VTK_STEREO_CHECKERBOARD 8
71 #define VTK_CURSOR_DEFAULT 0
72 #define VTK_CURSOR_ARROW 1
73 #define VTK_CURSOR_SIZENE 2
74 #define VTK_CURSOR_SIZENW 3
75 #define VTK_CURSOR_SIZESW 4
76 #define VTK_CURSOR_SIZESE 5
77 #define VTK_CURSOR_SIZENS 6
78 #define VTK_CURSOR_SIZEWE 7
79 #define VTK_CURSOR_SIZEALL 8
80 #define VTK_CURSOR_HAND 9
81 #define VTK_CURSOR_CROSSHAIR 10
91 #ifdef VTK_LEAN_AND_MEAN
92 # define vtkGraphicErrorMacro(renderWindow,message)
94 # define vtkGraphicErrorMacro(renderWindow,message) \
95 if(renderWindow->GetReportGraphicErrors()) \
97 renderWindow->CheckGraphicError(); \
98 if(renderWindow->HasGraphicError()) \
100 vtkErrorMacro(<<message<<" "<<renderWindow->GetLastGraphicErrorString()); \
127 static const char *GetRenderLibrary();
137 virtual void Start() = 0;
140 virtual void Finalize() = 0;
144 virtual void Frame() = 0;
148 virtual void WaitForCompletion()=0;
152 virtual void CopyResultFrame();
163 virtual void HideCursor() = 0;
164 virtual void ShowCursor() = 0;
170 vtkSetMacro(CurrentCursor,
int);
171 vtkGetMacro(CurrentCursor,
int);
176 virtual void SetFullScreen(
int) = 0;
177 vtkGetMacro(FullScreen,
int);
178 vtkBooleanMacro(FullScreen,
int);
185 vtkSetMacro(Borders,
int);
186 vtkGetMacro(Borders,
int);
187 vtkBooleanMacro(Borders,
int);
193 vtkGetMacro(StereoCapableWindow,
int);
194 vtkBooleanMacro(StereoCapableWindow,
int);
195 virtual void SetStereoCapableWindow(
int capable);
200 vtkGetMacro(StereoRender,
int);
201 void SetStereoRender(
int stereo);
202 vtkBooleanMacro(StereoRender,
int);
207 vtkSetMacro(AlphaBitPlanes,
int);
208 vtkGetMacro(AlphaBitPlanes,
int);
209 vtkBooleanMacro(AlphaBitPlanes,
int);
215 vtkSetMacro(PointSmoothing,
int);
216 vtkGetMacro(PointSmoothing,
int);
217 vtkBooleanMacro(PointSmoothing,
int);
223 vtkSetMacro(LineSmoothing,
int);
224 vtkGetMacro(LineSmoothing,
int);
225 vtkBooleanMacro(LineSmoothing,
int);
231 vtkSetMacro(PolygonSmoothing,
int);
232 vtkGetMacro(PolygonSmoothing,
int);
233 vtkBooleanMacro(PolygonSmoothing,
int);
249 vtkGetMacro(StereoType,
int);
250 vtkSetMacro(StereoType,
int);
251 void SetStereoTypeToCrystalEyes()
253 void SetStereoTypeToRedBlue()
255 void SetStereoTypeToInterlaced()
257 void SetStereoTypeToLeft()
259 void SetStereoTypeToRight()
261 void SetStereoTypeToDresden()
263 void SetStereoTypeToAnaglyph()
265 void SetStereoTypeToCheckerboard()
269 const char *GetStereoTypeAsString();
274 virtual void StereoUpdate();
278 virtual void StereoMidpoint();
282 virtual void StereoRenderComplete();
290 vtkSetClampMacro(AnaglyphColorSaturation,
float, 0.0f, 1.0f);
291 vtkGetMacro(AnaglyphColorSaturation,
float);
306 vtkSetVector2Macro(AnaglyphColorMask,
int);
307 vtkGetVectorMacro(AnaglyphColorMask,
int,2);
313 virtual void WindowRemap() = 0;
317 vtkSetMacro(SwapBuffers,
int);
318 vtkGetMacro(SwapBuffers,
int);
319 vtkBooleanMacro(SwapBuffers,
int);
332 virtual int SetPixelData(
int x,
int y,
int x2,
int y2,
unsigned char *
data,
334 virtual int SetPixelData(
int x,
int y,
int x2,
int y2,
344 virtual float *GetRGBAPixelData(
int x,
int y,
int x2,
int y2,
int front) = 0;
345 virtual int GetRGBAPixelData(
int x,
int y,
int x2,
int y2,
int front,
347 virtual int SetRGBAPixelData(
int x,
int y,
int x2,
int y2,
float *,
348 int front,
int blend=0) = 0;
349 virtual int SetRGBAPixelData(
int,
int,
int,
int,
vtkFloatArray*,
350 int,
int blend=0) = 0;
351 virtual void ReleaseRGBAPixelData(
float *
data)=0;
352 virtual unsigned char *GetRGBACharPixelData(
int x,
int y,
int x2,
int y2,
354 virtual int GetRGBACharPixelData(
int x,
int y,
int x2,
int y2,
int front,
356 virtual int SetRGBACharPixelData(
int x,
int y,
int x2,
int y2,
357 unsigned char *
data,
int front,
359 virtual int SetRGBACharPixelData(
int x,
int y,
int x2,
int y2,
367 virtual float *GetZbufferData(
int x,
int y,
int x2,
int y2) = 0;
368 virtual int GetZbufferData(
int x,
int y,
int x2,
int y2,
float *z) = 0;
369 virtual int GetZbufferData(
int x,
int y,
int x2,
int y2,
371 virtual int SetZbufferData(
int x,
int y,
int x2,
int y2,
float *z) = 0;
372 virtual int SetZbufferData(
int x,
int y,
int x2,
int y2,
374 float GetZbufferDataAtPoint(
int x,
int y)
377 this->GetZbufferData(x, y, x, y, &value);
386 vtkGetMacro(AAFrames,
int);
387 vtkSetMacro(AAFrames,
int);
396 vtkGetMacro(FDFrames,
int);
397 vtkSetMacro(FDFrames,
int);
407 vtkGetMacro(SubFrames,
int);
408 virtual void SetSubFrames(
int subFrames);
413 vtkGetMacro(NeverRendered,
int);
419 vtkGetMacro(AbortRender,
int);
420 vtkSetMacro(AbortRender,
int);
421 vtkGetMacro(InAbortCheck,
int);
422 vtkSetMacro(InAbortCheck,
int);
423 virtual int CheckAbortStatus();
426 vtkGetMacro(IsPicking,
int);
427 vtkSetMacro(IsPicking,
int);
428 vtkBooleanMacro(IsPicking,
int);
434 virtual int GetEventPending() = 0;
448 virtual void SetDesiredUpdateRate(
double);
449 vtkGetMacro(DesiredUpdateRate,
double);
457 vtkGetMacro(NumberOfLayers,
int);
477 virtual void SetNextWindowId(
void *) = 0;
485 virtual void SetNextWindowInfo(
char *) = 0;
495 virtual bool IsCurrent()=0;
513 virtual int GetDepthBufferSize() = 0;
517 virtual int GetColorBufferSizes(
int *rgba) = 0;
528 vtkSetMacro(MultiSamples,
int);
529 vtkGetMacro(MultiSamples,
int);
534 vtkSetMacro(StencilCapable,
int);
535 vtkGetMacro(StencilCapable,
int);
536 vtkBooleanMacro(StencilCapable,
int);
542 vtkSetMacro(ReportGraphicErrors,
int);
543 vtkGetMacro(ReportGraphicErrors,
int);
544 vtkBooleanMacro(ReportGraphicErrors,
int);
550 virtual void CheckGraphicError()=0;
553 virtual int HasGraphicError()=0;
556 virtual const char *GetLastGraphicErrorString()=0;
562 virtual void DoStereoRender();
563 virtual void DoFDRender();
564 virtual void DoAARender();
598 int AnaglyphColorMask[2];