15#ifndef QVTKRenderWindowAdapter_h
16#define QVTKRenderWindowAdapter_h
37#include "vtkGUISupportQtModule.h"
41#include <QScopedPointer>
53 using Superclass = QObject;
127 unsigned int targetId,
int targetAttachement,
const QRect& targetRect,
bool left =
true);
128 bool blitLeftEye(
unsigned int targetId,
int targetAttachement,
const QRect& targetRect)
130 return this->blit(targetId, targetAttachement, targetRect,
true);
132 bool blitRightEye(
unsigned int targetId,
int targetAttachement,
const QRect& targetRect)
134 return this->blit(targetId, targetAttachement, targetRect,
false);
183 void contextAboutToBeDestroyed();
191 QScopedPointer<QVTKInternals> Internals;
193 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.
QOpenGLContext * context() const
Get the context to use for rendering.
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