41 #ifndef vtkRenderWindow_h 42 #define vtkRenderWindow_h 44 #include "vtkRenderingCoreModule.h" 58 #define VTK_STEREO_CRYSTAL_EYES 1 59 #define VTK_STEREO_RED_BLUE 2 60 #define VTK_STEREO_INTERLACED 3 61 #define VTK_STEREO_LEFT 4 62 #define VTK_STEREO_RIGHT 5 63 #define VTK_STEREO_DRESDEN 6 64 #define VTK_STEREO_ANAGLYPH 7 65 #define VTK_STEREO_CHECKERBOARD 8 66 #define VTK_STEREO_SPLITVIEWPORT_HORIZONTAL 9 67 #define VTK_STEREO_FAKE 10 69 #define VTK_CURSOR_DEFAULT 0 70 #define VTK_CURSOR_ARROW 1 71 #define VTK_CURSOR_SIZENE 2 72 #define VTK_CURSOR_SIZENW 3 73 #define VTK_CURSOR_SIZESW 4 74 #define VTK_CURSOR_SIZESE 5 75 #define VTK_CURSOR_SIZENS 6 76 #define VTK_CURSOR_SIZEWE 7 77 #define VTK_CURSOR_SIZEALL 8 78 #define VTK_CURSOR_HAND 9 79 #define VTK_CURSOR_CROSSHAIR 10 112 static const char *GetRenderLibrary();
117 virtual const char *GetRenderingBackend();
142 vtkGetMacro(CapturingGL2PSSpecialProps,
int);
154 virtual void Start() = 0;
159 virtual void Finalize() = 0;
165 virtual void Frame() = 0;
171 virtual void WaitForCompletion()=0;
177 virtual void CopyResultFrame();
193 virtual void HideCursor() = 0;
194 virtual void ShowCursor() = 0;
202 vtkSetMacro(CurrentCursor,
int);
203 vtkGetMacro(CurrentCursor,
int);
233 virtual void SetStereoCapableWindow(
vtkTypeBool capable);
303 vtkGetMacro(StereoType,
int);
304 void SetStereoType(
int);
327 const char *GetStereoTypeAsString();
333 virtual void StereoUpdate();
339 virtual void StereoMidpoint();
345 virtual void StereoRenderComplete();
355 vtkSetClampMacro(AnaglyphColorSaturation,
float, 0.0f, 1.0f);
356 vtkGetMacro(AnaglyphColorSaturation,
float);
374 vtkSetVector2Macro(AnaglyphColorMask,
int);
375 vtkGetVectorMacro(AnaglyphColorMask,
int,2);
383 virtual void WindowRemap() = 0;
407 virtual int SetPixelData(
int x,
int y,
int x2,
int y2,
unsigned char *
data,
408 int front,
int right=0) = 0;
409 virtual int SetPixelData(
int x,
int y,
int x2,
int y2,
421 virtual float *GetRGBAPixelData(
int x,
int y,
int x2,
int y2,
int front,
int right=0) = 0;
422 virtual int GetRGBAPixelData(
int x,
int y,
int x2,
int y2,
int front,
424 virtual int SetRGBAPixelData(
int x,
int y,
int x2,
int y2,
float *,
425 int front,
int blend=0,
int right=0) = 0;
426 virtual int SetRGBAPixelData(
int,
int,
int,
int,
vtkFloatArray*,
427 int,
int blend=0,
int right=0) = 0;
428 virtual void ReleaseRGBAPixelData(
float *
data) = 0;
429 virtual unsigned char *GetRGBACharPixelData(
int x,
int y,
int x2,
int y2,
430 int front,
int right=0) = 0;
431 virtual int GetRGBACharPixelData(
int x,
int y,
int x2,
int y2,
int front,
433 virtual int SetRGBACharPixelData(
int x,
int y,
int x2,
int y2,
434 unsigned char *
data,
int front,
435 int blend=0,
int right=0) = 0;
436 virtual int SetRGBACharPixelData(
int x,
int y,
int x2,
int y2,
438 int blend=0,
int right=0) = 0;
447 virtual float *GetZbufferData(
int x,
int y,
int x2,
int y2) = 0;
448 virtual int GetZbufferData(
int x,
int y,
int x2,
int y2,
float *z) = 0;
449 virtual int GetZbufferData(
int x,
int y,
int x2,
int y2,
451 virtual int SetZbufferData(
int x,
int y,
int x2,
int y2,
float *z) = 0;
452 virtual int SetZbufferData(
int x,
int y,
int x2,
int y2,
457 this->GetZbufferData(x, y, x, y, &
value);
466 vtkGetMacro(NeverRendered,
int);
474 vtkGetMacro(AbortRender,
int);
475 vtkSetMacro(AbortRender,
int);
476 vtkGetMacro(InAbortCheck,
int);
477 vtkSetMacro(InAbortCheck,
int);
478 virtual int CheckAbortStatus();
491 virtual int GetEventPending() = 0;
512 virtual void SetDesiredUpdateRate(
double);
513 vtkGetMacro(DesiredUpdateRate,
double);
523 vtkGetMacro(NumberOfLayers,
int);
524 vtkSetClampMacro(NumberOfLayers,
int, 1,
VTK_INT_MAX);
551 virtual void SetNextWindowId(
void *) = 0;
559 virtual void SetNextWindowInfo(
const char *) = 0;
592 virtual bool IsCurrent()=0;
628 virtual int GetDepthBufferSize() = 0;
634 virtual int GetColorBufferSizes(
int *rgba) = 0;
640 vtkSetMacro(MultiSamples,
int);
641 vtkGetMacro(MultiSamples,
int);
660 vtkSetMacro(DeviceIndex,
int);
661 vtkGetMacro(DeviceIndex,
int);
688 vtkGetMacro(UseSRGBColorSpace,
bool);
689 vtkSetMacro(UseSRGBColorSpace,
bool);
690 vtkBooleanMacro(UseSRGBColorSpace,
bool);
697 virtual void DoStereoRender();
726 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
vtkTypeBool PolygonSmoothing
#define VTK_STEREO_CHECKERBOARD
vtkTypeBool LineSmoothing
vtkTypeBool PointSmoothing
float * AccumulationBuffer
dynamic, self-adjusting array of float
virtual void SetParentInfo(const char *)=0
These are window system independent methods that are used to help interface vtkWindow to native windo...
void SetStereoTypeToSplitViewportHorizontal()
Set/Get what type of stereo rendering to use.
vtkRenderWindow * SharedRenderWindow
#define VTK_STEREO_DRESDEN
void SetStereoTypeToAnaglyph()
Set/Get what type of stereo rendering to use.
#define VTK_STEREO_RED_BLUE
abstract specification for renderers
vtkTypeBool StencilCapable
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
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...
vtkTypeBool AlphaBitPlanes
abstract base class for most VTK objects
virtual void MakeCurrent()
Make the window current.
vtkNew< vtkRenderTimerLog > RenderTimer
#define VTK_STEREO_CRYSTAL_EYES
dynamic, self-adjusting array of unsigned char
virtual void SetWindowInfo(const char *)=0
These are window system independent methods that are used to help interface vtkWindow to native windo...
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.
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 bool GetPlatformSupportsRenderWindowSharing()
Set/Get an already existing window that this window should share data with if possible.
virtual void * GetGenericDisplayId()=0
These are window system independent methods that are used to help interface vtkWindow to native windo...
int CapturingGL2PSSpecialProps
vtkRenderWindowInteractor * Interactor
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
virtual bool GetUseOffScreenBuffers()
vtkTypeBool StereoCapableWindow
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