3#ifndef QVTKRenderWindowAdapter_h
4#define QVTKRenderWindowAdapter_h
25#include "vtkGUISupportQtModule.h"
29#include <QScopedPointer>
36VTK_ABI_NAMESPACE_BEGIN
43 using Superclass = QObject;
112 unsigned int targetId,
int targetAttachement,
const QRect& targetRect,
bool left =
true);
113 bool blitLeftEye(
unsigned int targetId,
int targetAttachement,
const QRect& targetRect)
115 return this->blit(targetId, targetAttachement, targetRect,
true);
117 bool blitRightEye(
unsigned int targetId,
int targetAttachement,
const QRect& targetRect)
119 return this->blit(targetId, targetAttachement, targetRect,
false);
168 void contextAboutToBeDestroyed();
176 QScopedPointer<QVTKInternals> Internals;
178 QCursor DefaultCursor;
Helper to manage Qt context and other OpenGL components.
static QSurfaceFormat defaultFormat(bool stereo_capable=false)
Returns a QSurfaceFormat suitable for surfaces that intend to be used for VTK rendering.
bool blitLeftEye(unsigned int targetId, int targetAttachement, const QRect &targetRect)
Convenience methods to blit the results rendered in the internal FBO to a target.
~QVTKRenderWindowAdapter() override
QVTKRenderWindowAdapter(QOpenGLContext *cntxt, vtkGenericOpenGLRenderWindow *window, QWidget *parent)
Constructor that makes vtkGenericOpenGLRenderWindow ready for subsequent render requests i....
const QCursor & defaultCursor() const
Get/set the default cursor.
void setUnscaledDPI(int value)
Set the unscaled DPI to use when scaling DPI.
void setCustomDevicePixelRatio(double dpr)
Get/Set the custom device pixel ratio to use.
void resize(int width, int height)
Call this method to resize the render window.
bool blit(unsigned int targetId, int targetAttachement, const QRect &targetRect, bool left=true)
Convenience methods to blit the results rendered in the internal FBO to a target.
bool handleEvent(QEvent *evt)
Process the event and return true if the event have been processed successfully.
bool blitRightEye(unsigned int targetId, int targetAttachement, const QRect &targetRect)
Convenience methods to blit the results rendered in the internal FBO to a target.
void paint()
Call this method in paintGL to request a render.
QVTKRenderWindowAdapter(QOpenGLContext *cntxt, vtkGenericOpenGLRenderWindow *window, QWindow *parent)
Constructor that makes vtkGenericOpenGLRenderWindow ready for subsequent render requests i....
void setEnableHiDPI(bool value)
Enable/disable DPI scaling.
void setDefaultCursor(const QCursor &cursor)
Get/set the default cursor.
platform independent render window
abstract base class for most VTK objects