47 #ifndef vtkRenderWindow_h 48 #define vtkRenderWindow_h 50 #include "vtkRenderingCoreModule.h" 55 #ifndef VTK_LEGACY_REMOVE 67 #define VTK_STEREO_CRYSTAL_EYES 1 68 #define VTK_STEREO_RED_BLUE 2 69 #define VTK_STEREO_INTERLACED 3 70 #define VTK_STEREO_LEFT 4 71 #define VTK_STEREO_RIGHT 5 72 #define VTK_STEREO_DRESDEN 6 73 #define VTK_STEREO_ANAGLYPH 7 74 #define VTK_STEREO_CHECKERBOARD 8 75 #define VTK_STEREO_SPLITVIEWPORT_HORIZONTAL 9 76 #define VTK_STEREO_FAKE 10 78 #define VTK_CURSOR_DEFAULT 0 79 #define VTK_CURSOR_ARROW 1 80 #define VTK_CURSOR_SIZENE 2 81 #define VTK_CURSOR_SIZENW 3 82 #define VTK_CURSOR_SIZESW 4 83 #define VTK_CURSOR_SIZESE 5 84 #define VTK_CURSOR_SIZENS 6 85 #define VTK_CURSOR_SIZEWE 7 86 #define VTK_CURSOR_SIZEALL 8 87 #define VTK_CURSOR_HAND 9 88 #define VTK_CURSOR_CROSSHAIR 10 121 static const char *GetRenderLibrary();
126 virtual const char *GetRenderingBackend();
151 vtkGetMacro(CapturingGL2PSSpecialProps,
int);
163 virtual void Start() = 0;
168 virtual void Finalize() = 0;
174 virtual void Frame() = 0;
180 virtual void WaitForCompletion()=0;
186 virtual void CopyResultFrame();
202 virtual void HideCursor() = 0;
203 virtual void ShowCursor() = 0;
212 vtkGetMacro(CurrentCursor,
int);
219 virtual void SetFullScreen(
int) = 0;
220 vtkGetMacro(FullScreen,
int);
231 vtkGetMacro(Borders,
int);
240 vtkGetMacro(StereoCapableWindow,
int);
242 virtual void SetStereoCapableWindow(
int capable);
249 vtkGetMacro(StereoRender,
int);
250 void SetStereoRender(
int stereo);
259 vtkGetMacro(AlphaBitPlanes,
int);
269 vtkGetMacro(PointSmoothing,
int);
279 vtkGetMacro(LineSmoothing,
int);
289 vtkGetMacro(PolygonSmoothing,
int);
312 vtkGetMacro(StereoType,
int);
336 const char *GetStereoTypeAsString();
342 virtual void StereoUpdate();
348 virtual void StereoMidpoint();
354 virtual void StereoRenderComplete();
364 vtkSetClampMacro(AnaglyphColorSaturation,
float, 0.0f, 1.0f);
365 vtkGetMacro(AnaglyphColorSaturation,
float);
383 vtkSetVector2Macro(AnaglyphColorMask,
int);
384 vtkGetVectorMacro(AnaglyphColorMask,
int,2);
392 virtual void WindowRemap() = 0;
399 vtkGetMacro(SwapBuffers,
int);
416 virtual int SetPixelData(
int x,
int y,
int x2,
int y2,
unsigned char *
data,
417 int front,
int right=0) = 0;
418 virtual int SetPixelData(
int x,
int y,
int x2,
int y2,
430 virtual float *GetRGBAPixelData(
int x,
int y,
int x2,
int y2,
int front,
int right=0) = 0;
431 virtual int GetRGBAPixelData(
int x,
int y,
int x2,
int y2,
int front,
433 virtual int SetRGBAPixelData(
int x,
int y,
int x2,
int y2,
float *,
434 int front,
int blend=0,
int right=0) = 0;
435 virtual int SetRGBAPixelData(
int,
int,
int,
int,
vtkFloatArray*,
436 int,
int blend=0,
int right=0) = 0;
437 virtual void ReleaseRGBAPixelData(
float *
data) = 0;
438 virtual unsigned char *GetRGBACharPixelData(
int x,
int y,
int x2,
int y2,
439 int front,
int right=0) = 0;
440 virtual int GetRGBACharPixelData(
int x,
int y,
int x2,
int y2,
int front,
442 virtual int SetRGBACharPixelData(
int x,
int y,
int x2,
int y2,
443 unsigned char *
data,
int front,
444 int blend=0,
int right=0) = 0;
445 virtual int SetRGBACharPixelData(
int x,
int y,
int x2,
int y2,
447 int blend=0,
int right=0) = 0;
456 virtual float *GetZbufferData(
int x,
int y,
int x2,
int y2) = 0;
457 virtual int GetZbufferData(
int x,
int y,
int x2,
int y2,
float *z) = 0;
458 virtual int GetZbufferData(
int x,
int y,
int x2,
int y2,
460 virtual int SetZbufferData(
int x,
int y,
int x2,
int y2,
float *z) = 0;
461 virtual int SetZbufferData(
int x,
int y,
int x2,
int y2,
466 this->GetZbufferData(x, y, x, y, &
value);
477 VTK_LEGACY(
virtual void SetAAFrames(
int));
478 VTK_LEGACY(
virtual int GetAAFrames());
489 VTK_LEGACY(
virtual int GetFDFrames());
490 VTK_LEGACY(
virtual void SetFDFrames(
int fdFrames));
501 VTK_LEGACY(
virtual int GetUseConstantFDOffsets());
502 VTK_LEGACY(
virtual void SetUseConstantFDOffsets(
int));
514 VTK_LEGACY(
virtual int GetSubFrames());
515 VTK_LEGACY(
virtual void SetSubFrames(
int subFrames));
522 vtkGetMacro(NeverRendered,
int);
530 vtkGetMacro(AbortRender,
int);
532 vtkGetMacro(InAbortCheck,
int);
534 virtual int CheckAbortStatus();
537 vtkGetMacro(IsPicking,
int);
547 virtual int GetEventPending() = 0;
568 virtual void SetDesiredUpdateRate(
double);
569 vtkGetMacro(DesiredUpdateRate,
double);
579 vtkGetMacro(NumberOfLayers,
int);
580 vtkSetClampMacro(NumberOfLayers,
int, 1,
VTK_INT_MAX);
607 virtual void SetNextWindowId(
void *) = 0;
615 virtual void SetNextWindowInfo(
char *) = 0;
635 virtual bool IsCurrent()=0;
671 virtual int GetDepthBufferSize() = 0;
677 virtual int GetColorBufferSizes(
int *rgba) = 0;
693 vtkGetMacro(MultiSamples,
int);
701 vtkGetMacro(StencilCapable,
int);
713 vtkGetMacro(DeviceIndex,
int);
740 vtkGetMacro(UseSRGBColorSpace,
bool);
749 virtual void DoStereoRender();
750 virtual void DoFDRender();
751 virtual void DoAARender();
753 #ifndef VTK_LEGACY_REMOVE 775 double *ConstantFDOffsets[2];
789 int AnaglyphColorMask[2];
abstract superclass for all actors, volumes and annotations
virtual void SetForceMakeCurrent()
If called, allow MakeCurrent() to skip cache-check when called.
void SetStereoTypeToRight()
Set/Get what type of stereo rendering to use.
virtual void * GetGenericDrawable()=0
These are window system independent methods that are used to help interface vtkWindow to native windo...
virtual void SetDisplayId(void *)=0
These are window system independent methods that are used to help interface vtkWindow to native windo...
virtual int SetUseOffScreenBuffers(bool)
Create and bind offscreen rendering buffers without destroying the current OpenGL context.
void SetStereoTypeToFake()
Set/Get what type of stereo rendering to use.
float AnaglyphColorSaturation
#define VTK_STEREO_CHECKERBOARD
float * AccumulationBuffer
vtkPainterDeviceAdapter * PainterDeviceAdapter
dynamic, self-adjusting array of float
void SetStereoTypeToSplitViewportHorizontal()
Set/Get what type of stereo rendering to use.
#define VTK_STEREO_DRESDEN
void SetStereoTypeToAnaglyph()
Set/Get what type of stereo rendering to use.
#define VTK_STEREO_RED_BLUE
abstract specification for renderers
virtual void SetParentInfo(char *)=0
These are window system independent methods that are used to help interface vtkWindow to native windo...
virtual void * GetGenericContext()=0
These are window system independent methods that are used to help interface vtkWindow to native windo...
#define VTK_STEREO_INTERLACED
void SetStereoTypeToCrystalEyes()
Set/Get what type of stereo rendering to use.
window superclass for vtkRenderWindow
unsigned char * ResultFrame
platform-independent render window interaction including picking and frame rate control.
virtual const char * ReportCapabilities()
Get report of capabilities for the render window.
virtual int IsDirect()
Is this render window using hardware acceleration? 0-false, 1-true.
virtual int SupportsOpenGL()
Does this render window support OpenGL? 0-false, 1-true.
an ordered list of renderers
An adapter between a vtkPainter and a rendering device.
virtual int CheckInRenderStatus()
Are we rendering at the moment.
virtual void UnRegister(vtkObjectBase *o)
Decrease the reference count (release by another object).
void SetStereoTypeToRedBlue()
Set/Get what type of stereo rendering to use.
double AbortCheckTime
The universal time since the last abort check occurred.
vtkGetNewMacro(RenderTimer, vtkRenderTimerLog) vtkRendererCollection *GetRenderers()
Get the render timer log for this window.
unsigned int AccumulationBufferSize
a simple class to control print indentation
void SetStereoTypeToCheckerboard()
Set/Get what type of stereo rendering to use.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
float GetZbufferDataAtPoint(int x, int y)
Set/Get the zbuffer data from the frame buffer.
void SetStereoTypeToInterlaced()
Set/Get what type of stereo rendering to use.
virtual void SetWindowId(void *)=0
These are window system independent methods that are used to help interface vtkWindow to native windo...
virtual void SetCursorPosition(int, int)
Hide or Show the mouse cursor, it is nice to be able to hide the default cursor if you want VTK to di...
abstract base class for most VTK objects
virtual void MakeCurrent()
Make the window current.
vtkNew< vtkRenderTimerLog > RenderTimer
#define VTK_STEREO_CRYSTAL_EYES
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
dynamic, self-adjusting array of unsigned char
virtual void SetParentId(void *)=0
These are window system independent methods that are used to help interface vtkWindow to native windo...
void SetStereoTypeToDresden()
Set/Get what type of stereo rendering to use.
virtual void SetWindowInfo(char *)=0
These are window system independent methods that are used to help interface vtkWindow to native windo...
create a window for renderers to draw into
#define VTK_STEREO_SPLITVIEWPORT_HORIZONTAL
virtual bool InitializeFromCurrentContext()
Initialize the render window from the information associated with the currently activated OpenGL cont...
virtual void ClearInRenderStatus()
Clear status (after an exception was thrown for example)
create and manipulate ordered lists of objects
virtual void * GetGenericDisplayId()=0
These are window system independent methods that are used to help interface vtkWindow to native windo...
int CapturingGL2PSSpecialProps
vtkRenderWindowInteractor * Interactor
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
virtual bool GetUseOffScreenBuffers()
unsigned char * StereoBuffer
virtual void * GetGenericParentId()=0
These are window system independent methods that are used to help interface vtkWindow to native windo...
virtual int GetNumberOfDevices()
Returns the number of devices (graphics cards) on a system.
virtual void Render()=0
Ask each viewport owned by this Window to render its image and synchronize this process.
void SetStereoTypeToLeft()
Set/Get what type of stereo rendering to use.
#define VTK_STEREO_ANAGLYPH
virtual bool IsDrawable()
Test if the window has a valid drawable.
Asynchronously measures GPU execution times for a series of events.
virtual void * GetGenericWindowId()=0
These are window system independent methods that are used to help interface vtkWindow to native windo...
vtkRendererCollection * Renderers