QtBase  v6.3.1
Public Slots | Public Member Functions | Protected Member Functions | List of all members
OpenGLWindow Class Reference

[1] More...

#include <openglwindow.h>

Inheritance diagram for OpenGLWindow:
Inheritance graph
[legend]
Collaboration diagram for OpenGLWindow:
Collaboration graph
[legend]

Public Slots

void renderLater ()
 [2] More...
 
void renderNow ()
 [3] More...
 
- Public Slots inherited from QWindow
 Q_REVISION (2, 1) void requestActivate()
 
void setVisible (bool visible)
 
void show ()
 
void hide ()
 
void showMinimized ()
 
void showMaximized ()
 
void showFullScreen ()
 
void showNormal ()
 
bool close ()
 
void raise ()
 
void lower ()
 
bool startSystemResize (Qt::Edges edges)
 Start a system-specific resize operation. More...
 
bool startSystemMove ()
 Start a system-specific move operation. More...
 
void setTitle (const QString &)
 
void setX (int arg)
 
void setY (int arg)
 
void setWidth (int arg)
 
void setHeight (int arg)
 
void setGeometry (int posx, int posy, int w, int h)
 
void setGeometry (const QRect &rect)
 Sets the geometry of the window, excluding its window frame, to rect. More...
 
void setMinimumWidth (int w)
 
void setMinimumHeight (int h)
 
void setMaximumWidth (int w)
 
void setMaximumHeight (int h)
 
 Q_REVISION (2, 1) void alert(int msec)
 
 Q_REVISION (2, 3) void requestUpdate()
 
- Public Slots inherited from QObject
void deleteLater ()
 
- Public Slots inherited from QPaintDeviceWindow
void update ()
 

Public Member Functions

 OpenGLWindow (QWindow *parent=nullptr)
 [1] More...
 
 ~OpenGLWindow ()
 [1] More...
 
virtual void render (QPainter *painter)
 [2] More...
 
virtual void render ()
 
virtual void initialize ()
 
void setAnimating (bool animating)
 [4] More...
 
 OpenGLWindow ()
 
- Public Member Functions inherited from QObject
Q_INVOKABLE QObject (QObject *parent=nullptr)
 
virtual ~QObject ()
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
QString objectName () const
 
void setObjectName (const QString &name)
 
QBindable< QStringbindableObjectName ()
 
bool isWidgetType () const
 
bool isWindowType () const
 
bool signalsBlocked () const noexcept
 
bool blockSignals (bool b) noexcept
 
QThreadthread () const
 
void moveToThread (QThread *thread)
 
int startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer)
 
void killTimer (int id)
 
template<typename T >
T findChild (const QString &aName=QString(), Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
template<typename T >
QList< TfindChildren (const QString &aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
template<typename T >
QList< TfindChildren (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
const QObjectListchildren () const
 
void setParent (QObject *parent)
 
void installEventFilter (QObject *filterObj)
 
void removeEventFilter (QObject *obj)
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const
 
bool disconnect (const char *signal=nullptr, const QObject *receiver=nullptr, const char *member=nullptr) const
 
bool disconnect (const QObject *receiver, const char *member=nullptr) const
 
void dumpObjectTree () const
 
void dumpObjectInfo () const
 
bool setProperty (const char *name, const QVariant &value)
 
QVariant property (const char *name) const
 
QList< QByteArraydynamicPropertyNames () const
 
QBindingStoragebindingStorage ()
 
const QBindingStoragebindingStorage () const
 
QObjectparent () const
 
bool inherits (const char *classname) const
 
- Public Member Functions inherited from QSurface
virtual ~QSurface ()
 
SurfaceClass surfaceClass () const
 
virtual QPlatformSurfacesurfaceHandle () const =0
 
bool supportsOpenGL () const
 
- Public Member Functions inherited from QOpenGLWindow
 QOpenGLWindow (UpdateBehavior updateBehavior=NoPartialUpdate, QWindow *parent=nullptr)
 
 QOpenGLWindow (QOpenGLContext *shareContext, UpdateBehavior updateBehavior=NoPartialUpdate, QWindow *parent=nullptr)
 
 ~QOpenGLWindow ()
 
UpdateBehavior updateBehavior () const
 
bool isValid () const
 
void makeCurrent ()
 
void doneCurrent ()
 
QOpenGLContextcontext () const
 
QOpenGLContextshareContext () const
 
GLuint defaultFramebufferObject () const
 
QImage grabFramebuffer ()
 
- Public Member Functions inherited from QPaintDeviceWindow
void update (const QRect &rect)
 
void update (const QRegion &region)
 
- Public Member Functions inherited from QPaintDevice
virtual ~QPaintDevice ()
 
virtual int devType () const
 
bool paintingActive () const
 
int width () const
 
int height () const
 
int widthMM () const
 
int heightMM () const
 
int logicalDpiX () const
 
int logicalDpiY () const
 
int physicalDpiX () const
 
int physicalDpiY () const
 
qreal devicePixelRatio () const
 
qreal devicePixelRatioF () const
 
int colorCount () const
 
int depth () const
 

Protected Member Functions

bool event (QEvent *event) override
 
void exposeEvent (QExposeEvent *event) override
 
void paintGL () override
 
void resizeGL (int w, int h) override
 
void keyPressEvent (QKeyEvent *e) override
 
- Protected Member Functions inherited from QWindow
virtual void moveEvent (QMoveEvent *)
 
virtual void focusInEvent (QFocusEvent *)
 
virtual void focusOutEvent (QFocusEvent *)
 
virtual void showEvent (QShowEvent *)
 
virtual void hideEvent (QHideEvent *)
 
virtual void closeEvent (QCloseEvent *)
 
virtual void keyReleaseEvent (QKeyEvent *)
 
virtual void mousePressEvent (QMouseEvent *)
 
virtual void mouseReleaseEvent (QMouseEvent *)
 
virtual void mouseDoubleClickEvent (QMouseEvent *)
 
virtual void mouseMoveEvent (QMouseEvent *)
 
virtual void touchEvent (QTouchEvent *)
 
virtual bool nativeEvent (const QByteArray &eventType, void *message, qintptr *result)
 
 QWindow (QWindowPrivate &dd, QWindow *parent)
 
- Protected Member Functions inherited from QObject
QObjectsender () const
 
int senderSignalIndex () const
 
int receivers (const char *signal) const
 
bool isSignalConnected (const QMetaMethod &signal) const
 
virtual void timerEvent (QTimerEvent *event)
 
virtual void childEvent (QChildEvent *event)
 
virtual void customEvent (QEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
 QObject (QObjectPrivate &dd, QObject *parent=nullptr)
 
- Protected Member Functions inherited from QSurface
 QSurface (SurfaceClass type)
 
- Protected Member Functions inherited from QOpenGLFunctions
 QOpenGLFunctions ()
 
 QOpenGLFunctions (QOpenGLContext *context)
 
 ~QOpenGLFunctions ()
 
QOpenGLFunctions::OpenGLFeatures openGLFeatures () const
 
bool hasOpenGLFeature (QOpenGLFunctions::OpenGLFeature feature) const
 
void initializeOpenGLFunctions ()
 
void glBindTexture (GLenum target, GLuint texture)
 
void glBlendFunc (GLenum sfactor, GLenum dfactor)
 
void glClear (GLbitfield mask)
 
void glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
 
void glClearStencil (GLint s)
 
void glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
 
void glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
 
void glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
 
void glCullFace (GLenum mode)
 
void glDeleteTextures (GLsizei n, const GLuint *textures)
 
void glDepthFunc (GLenum func)
 
void glDepthMask (GLboolean flag)
 
void glDisable (GLenum cap)
 
void glDrawArrays (GLenum mode, GLint first, GLsizei count)
 
void glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
 
void glEnable (GLenum cap)
 
void glFinish ()
 
void glFlush ()
 
void glFrontFace (GLenum mode)
 
void glGenTextures (GLsizei n, GLuint *textures)
 
void glGetBooleanv (GLenum pname, GLboolean *params)
 
GLenum glGetError ()
 
void glGetFloatv (GLenum pname, GLfloat *params)
 
void glGetIntegerv (GLenum pname, GLint *params)
 
const GLubyte * glGetString (GLenum name)
 
void glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params)
 
void glGetTexParameteriv (GLenum target, GLenum pname, GLint *params)
 
void glHint (GLenum target, GLenum mode)
 
GLboolean glIsEnabled (GLenum cap)
 
GLboolean glIsTexture (GLuint texture)
 
void glLineWidth (GLfloat width)
 
void glPixelStorei (GLenum pname, GLint param)
 
void glPolygonOffset (GLfloat factor, GLfloat units)
 
void glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels)
 
void glScissor (GLint x, GLint y, GLsizei width, GLsizei height)
 
void glStencilFunc (GLenum func, GLint ref, GLuint mask)
 
void glStencilMask (GLuint mask)
 
void glStencilOp (GLenum fail, GLenum zfail, GLenum zpass)
 
void glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels)
 
void glTexParameterf (GLenum target, GLenum pname, GLfloat param)
 
void glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params)
 
void glTexParameteri (GLenum target, GLenum pname, GLint param)
 
void glTexParameteriv (GLenum target, GLenum pname, const GLint *params)
 
void glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)
 
void glViewport (GLint x, GLint y, GLsizei width, GLsizei height)
 
void glActiveTexture (GLenum texture)
 
void glAttachShader (GLuint program, GLuint shader)
 
void glBindAttribLocation (GLuint program, GLuint index, const char *name)
 
void glBindBuffer (GLenum target, GLuint buffer)
 
void glBindFramebuffer (GLenum target, GLuint framebuffer)
 
void glBindRenderbuffer (GLenum target, GLuint renderbuffer)
 
void glBlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
 
void glBlendEquation (GLenum mode)
 
void glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha)
 
void glBlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
 
void glBufferData (GLenum target, qopengl_GLsizeiptr size, const void *data, GLenum usage)
 
void glBufferSubData (GLenum target, qopengl_GLintptr offset, qopengl_GLsizeiptr size, const void *data)
 
GLenum glCheckFramebufferStatus (GLenum target)
 
void glClearDepthf (GLclampf depth)
 
void glCompileShader (GLuint shader)
 
void glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data)
 
void glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data)
 
GLuint glCreateProgram ()
 
GLuint glCreateShader (GLenum type)
 
void glDeleteBuffers (GLsizei n, const GLuint *buffers)
 
void glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers)
 
void glDeleteProgram (GLuint program)
 
void glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers)
 
void glDeleteShader (GLuint shader)
 
void glDepthRangef (GLclampf zNear, GLclampf zFar)
 
void glDetachShader (GLuint program, GLuint shader)
 
void glDisableVertexAttribArray (GLuint index)
 
void glEnableVertexAttribArray (GLuint index)
 
void glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
 
void glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
 
void glGenBuffers (GLsizei n, GLuint *buffers)
 
void glGenerateMipmap (GLenum target)
 
void glGenFramebuffers (GLsizei n, GLuint *framebuffers)
 
void glGenRenderbuffers (GLsizei n, GLuint *renderbuffers)
 
void glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name)
 
void glGetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name)
 
void glGetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei *count, GLuint *shaders)
 
GLint glGetAttribLocation (GLuint program, const char *name)
 
void glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params)
 
void glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params)
 
void glGetProgramiv (GLuint program, GLenum pname, GLint *params)
 
void glGetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei *length, char *infolog)
 
void glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params)
 
void glGetShaderiv (GLuint shader, GLenum pname, GLint *params)
 
void glGetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei *length, char *infolog)
 
void glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision)
 
void glGetShaderSource (GLuint shader, GLsizei bufsize, GLsizei *length, char *source)
 
void glGetUniformfv (GLuint program, GLint location, GLfloat *params)
 
void glGetUniformiv (GLuint program, GLint location, GLint *params)
 
GLint glGetUniformLocation (GLuint program, const char *name)
 
void glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params)
 
void glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params)
 
void glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer)
 
GLboolean glIsBuffer (GLuint buffer)
 
GLboolean glIsFramebuffer (GLuint framebuffer)
 
GLboolean glIsProgram (GLuint program)
 
GLboolean glIsRenderbuffer (GLuint renderbuffer)
 
GLboolean glIsShader (GLuint shader)
 
void glLinkProgram (GLuint program)
 
void glReleaseShaderCompiler ()
 
void glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
 
void glSampleCoverage (GLclampf value, GLboolean invert)
 
void glShaderBinary (GLint n, const GLuint *shaders, GLenum binaryformat, const void *binary, GLint length)
 
void glShaderSource (GLuint shader, GLsizei count, const char **string, const GLint *length)
 
void glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask)
 
void glStencilMaskSeparate (GLenum face, GLuint mask)
 
void glStencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
 
void glUniform1f (GLint location, GLfloat x)
 
void glUniform1fv (GLint location, GLsizei count, const GLfloat *v)
 
void glUniform1i (GLint location, GLint x)
 
void glUniform1iv (GLint location, GLsizei count, const GLint *v)
 
void glUniform2f (GLint location, GLfloat x, GLfloat y)
 
void glUniform2fv (GLint location, GLsizei count, const GLfloat *v)
 
void glUniform2i (GLint location, GLint x, GLint y)
 
void glUniform2iv (GLint location, GLsizei count, const GLint *v)
 
void glUniform3f (GLint location, GLfloat x, GLfloat y, GLfloat z)
 
void glUniform3fv (GLint location, GLsizei count, const GLfloat *v)
 
void glUniform3i (GLint location, GLint x, GLint y, GLint z)
 
void glUniform3iv (GLint location, GLsizei count, const GLint *v)
 
void glUniform4f (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
 
void glUniform4fv (GLint location, GLsizei count, const GLfloat *v)
 
void glUniform4i (GLint location, GLint x, GLint y, GLint z, GLint w)
 
void glUniform4iv (GLint location, GLsizei count, const GLint *v)
 
void glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
 
void glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
 
void glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value)
 
void glUseProgram (GLuint program)
 
void glValidateProgram (GLuint program)
 
void glVertexAttrib1f (GLuint indx, GLfloat x)
 
void glVertexAttrib1fv (GLuint indx, const GLfloat *values)
 
void glVertexAttrib2f (GLuint indx, GLfloat x, GLfloat y)
 
void glVertexAttrib2fv (GLuint indx, const GLfloat *values)
 
void glVertexAttrib3f (GLuint indx, GLfloat x, GLfloat y, GLfloat z)
 
void glVertexAttrib3fv (GLuint indx, const GLfloat *values)
 
void glVertexAttrib4f (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
 
void glVertexAttrib4fv (GLuint indx, const GLfloat *values)
 
void glVertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *ptr)
 
- Protected Member Functions inherited from QOpenGLWindow
virtual void initializeGL ()
 
virtual void paintUnderGL ()
 
virtual void paintOverGL ()
 
void paintEvent (QPaintEvent *event) override
 
void resizeEvent (QResizeEvent *event) override
 
int metric (PaintDeviceMetric metric) const override
 
QPaintDeviceredirected (QPoint *) const override
 
 QOpenGLWindow (UpdateBehavior updateBehavior=NoPartialUpdate, QWindow *parent=nullptr)
 
 QOpenGLWindow (QOpenGLContext *shareContext, UpdateBehavior updateBehavior=NoPartialUpdate, QWindow *parent=nullptr)
 
 ~QOpenGLWindow ()
 
UpdateBehavior updateBehavior () const
 
bool isValid () const
 
void makeCurrent ()
 
void doneCurrent ()
 
QOpenGLContextcontext () const
 
QOpenGLContextshareContext () const
 
GLuint defaultFramebufferObject () const
 
QImage grabFramebuffer ()
 
- Protected Member Functions inherited from QPaintDeviceWindow
void exposeEvent (QExposeEvent *) override
 
bool event (QEvent *event) override
 
 QPaintDeviceWindow (QPaintDeviceWindowPrivate &dd, QWindow *parent)
 
void update (const QRect &rect)
 
void update (const QRegion &region)
 
- Protected Member Functions inherited from QPaintDevice
 QPaintDevice () noexcept
 
virtual void initPainter (QPainter *painter) const
 
virtual QPaintersharedPainter () const
 
virtual ~QPaintDevice ()
 
virtual int devType () const
 
bool paintingActive () const
 
int width () const
 
int height () const
 
int widthMM () const
 
int heightMM () const
 
int logicalDpiX () const
 
int logicalDpiY () const
 
int physicalDpiX () const
 
int physicalDpiY () const
 
qreal devicePixelRatio () const
 
qreal devicePixelRatioF () const
 
int colorCount () const
 
int depth () const
 

Additional Inherited Members

- Public Types inherited from QSurface
enum  SurfaceClass { Window , Offscreen }
 
enum  SurfaceType {
  RasterSurface , OpenGLSurface , RasterGLSurface , OpenVGSurface ,
  VulkanSurface , MetalSurface , Direct3DSurface
}
 
- Public Types inherited from QOpenGLWindow
enum  UpdateBehavior { NoPartialUpdate , PartialUpdateBlit , PartialUpdateBlend }
 
- Public Types inherited from QPaintDevice
enum  PaintDeviceMetric {
  PdmWidth = 1 , PdmHeight , PdmWidthMM , PdmHeightMM ,
  PdmNumColors , PdmDepth , PdmDpiX , PdmDpiY ,
  PdmPhysicalDpiX , PdmPhysicalDpiY , PdmDevicePixelRatio , PdmDevicePixelRatioScaled
}
 
- Signals inherited from QWindow
void screenChanged (QScreen *screen)
 
void modalityChanged (Qt::WindowModality modality)
 
void windowStateChanged (Qt::WindowState windowState)
 
 Q_REVISION (2, 2) void windowTitleChanged(const QString &title)
 
void xChanged (int arg)
 
void yChanged (int arg)
 
void widthChanged (int arg)
 
void heightChanged (int arg)
 
void minimumWidthChanged (int arg)
 
void minimumHeightChanged (int arg)
 
void maximumWidthChanged (int arg)
 
void maximumHeightChanged (int arg)
 
void visibleChanged (bool arg)
 
Q_REVISION(2, 1) void visibilityChanged(QWindow Q_REVISION (2, 1) void activeChanged()
 
void contentOrientationChanged (Qt::ScreenOrientation orientation)
 
void focusObjectChanged (QObject *object)
 
 Q_REVISION (2, 1) void opacityChanged(qreal opacity)
 
 Q_REVISION (2, 13) void transientParentChanged(QWindow *transientParent)
 
- Signals inherited from QObject
void destroyed (QObject *=nullptr)
 
void objectNameChanged (const QString &objectName, QPrivateSignal)
 
- Signals inherited from QOpenGLWindow
void frameSwapped ()
 
- Static Public Member Functions inherited from QObject
static QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
 
static QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection)
 
template<typename Func1 , typename Func2 >
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiver, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection)
 
static QMetaObject::Connection ::type connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, Func2 slot)
 
static QMetaObject::Connection ::type connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *context, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection)
 
template<typename Func1 , typename Func2 >
static std::enable_if< QtPrivate::FunctionPointer< Func2 >::ArgumentCount==-1 &&!std::is_convertible_v< Func2, const char * >, QMetaObject::Connection >::type connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, Func2 slot)
 
template<typename Func1 , typename Func2 >
static std::enable_if< QtPrivate::FunctionPointer< Func2 >::ArgumentCount==-1 &&!std::is_convertible_v< Func2, const char * >, QMetaObject::Connection >::type connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *context, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member)
 
static bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member)
 
static bool disconnect (const QMetaObject::Connection &)
 
template<typename Func1 , typename Func2 >
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiver, Func2 slot)
 
template<typename Func1 >
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *receiver, void **zero)
 
- Static Public Member Functions inherited from QPaintDevice
static qreal devicePixelRatioFScale ()
 
- Protected Types inherited from QOpenGLFunctions
enum  OpenGLFeature {
  Multitexture = 0x0001 , Shaders = 0x0002 , Buffers = 0x0004 , Framebuffers = 0x0008 ,
  BlendColor = 0x0010 , BlendEquation = 0x0020 , BlendEquationSeparate = 0x0040 , BlendFuncSeparate = 0x0080 ,
  BlendSubtract = 0x0100 , CompressedTextures = 0x0200 , Multisample = 0x0400 , StencilSeparate = 0x0800 ,
  NPOTTextures = 0x1000 , NPOTTextureRepeat = 0x2000 , FixedFunctionPipeline = 0x4000 , TextureRGFormats = 0x8000 ,
  MultipleRenderTargets = 0x10000 , BlendEquationAdvanced = 0x20000
}
 
- Protected Types inherited from QOpenGLWindow
enum  UpdateBehavior { NoPartialUpdate , PartialUpdateBlit , PartialUpdateBlend }
 
- Protected Types inherited from QPaintDevice
enum  PaintDeviceMetric {
  PdmWidth = 1 , PdmHeight , PdmWidthMM , PdmHeightMM ,
  PdmNumColors , PdmDepth , PdmDpiX , PdmDpiY ,
  PdmPhysicalDpiX , PdmPhysicalDpiY , PdmDevicePixelRatio , PdmDevicePixelRatioScaled
}
 
- Protected Slots inherited from QPaintDeviceWindow
void update ()
 
- Static Protected Member Functions inherited from QOpenGLFunctions
static bool isInitialized (const QOpenGLFunctionsPrivate *d)
 
- Static Protected Member Functions inherited from QPaintDevice
static qreal devicePixelRatioFScale ()
 
- Protected Attributes inherited from QObject
QScopedPointer< QObjectDatad_ptr
 
- Protected Attributes inherited from QSurface
SurfaceClass m_type
 
QSurfacePrivate * m_reserved
 
- Protected Attributes inherited from QOpenGLFunctions
QOpenGLFunctionsPrivated_ptr
 
- Protected Attributes inherited from QPaintDevice
ushort painters
 
- Properties inherited from QWindow
QString title
 the window's title in the windowing system More...
 
Qt::WindowModality modality
 the modality of the window More...
 
Qt::WindowFlags flags
 the window flags of the window More...
 
int x
 the x position of the window's geometry More...
 
int y
 the y position of the window's geometry More...
 
int width
 the width of the window's geometry More...
 
int height
 the height of the window's geometry More...
 
int minimumWidth
 the minimum width of the window's geometry More...
 
int minimumHeight
 the minimum height of the window's geometry More...
 
int maximumWidth
 the maximum width of the window's geometry More...
 
int maximumHeight
 the maximum height of the window's geometry More...
 
bool visible
 whether the window is visible or not More...
 
bool active
 the active status of the window More...
 
Visibility visibility
 the screen-occupation state of the window More...
 
Qt::ScreenOrientation contentOrientation
 the orientation of the window's contents More...
 
qreal opacity
 The opacity of the window in the windowing system. More...
 
- Properties inherited from QObject
QString objectName
 the name of this object More...
 
- Properties inherited from QPaintDeviceWindow
int width
 the width of the window's geometry More...
 
int height
 the height of the window's geometry More...
 

Detailed Description

[1]

Definition at line 61 of file openglwindow.h.

Constructor & Destructor Documentation

◆ OpenGLWindow() [1/2]

OpenGLWindow::OpenGLWindow ( QWindow parent = nullptr)
explicit

[1]

Definition at line 58 of file openglwindow.cpp.

◆ ~OpenGLWindow()

OpenGLWindow::~OpenGLWindow ( )

[1]

Definition at line 65 of file openglwindow.cpp.

◆ OpenGLWindow() [2/2]

OpenGLWindow::OpenGLWindow ( )

Definition at line 108 of file main.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ event()

bool OpenGLWindow::event ( QEvent ev)
overrideprotectedvirtual

Override this to handle any event (ev) sent to the window. Return true if the event was recognized and processed.

Remember to call the base class version if you wish for mouse events, key events, resize events, etc to be dispatched as usual.

Reimplemented from QWindow.

Reimplemented in Window, Window, Window, Window, Window, and Window.

Definition at line 100 of file openglwindow.cpp.

Here is the call graph for this function:

◆ exposeEvent()

void OpenGLWindow::exposeEvent ( QExposeEvent ev)
overrideprotectedvirtual

The expose event (ev) is sent by the window system when a window moves between the un-exposed and exposed states.

An exposed window is potentially visible to the user. If the window is moved off screen, is made totally obscured by another window, is minimized, or similar, this function might be called and the value of isExposed() might change to false. You may use this event to limit expensive operations such as animations to only run when the window is exposed.

This event should not be used to paint. To handle painting implement paintEvent() instead.

A resize event will always be sent before the expose event the first time a window is shown.

See also
paintEvent(), isExposed()

Reimplemented from QWindow.

Reimplemented in Window, Window, Window, Window, Window, Window, Window, Window, Window, and Window.

Definition at line 111 of file openglwindow.cpp.

Here is the call graph for this function:

◆ initialize()

void OpenGLWindow::initialize ( )
virtual

Reimplemented in TriangleWindow.

Definition at line 75 of file openglwindow.cpp.

Here is the caller graph for this function:

◆ keyPressEvent()

void OpenGLWindow::keyPressEvent ( QKeyEvent ev)
overrideprotectedvirtual

Override this to handle key press events (ev).

See also
keyReleaseEvent()

Reimplemented from QWindow.

Reimplemented in Window, Window, Window, and Window.

Definition at line 162 of file main.cpp.

Here is the call graph for this function:

◆ paintGL()

void OpenGLWindow::paintGL ( )
overrideprotectedvirtual

This virtual function is called whenever the window contents needs to be painted. Reimplement it in a subclass.

There is no need to call makeCurrent() because this has already been done when this function is called.

Before invoking this function, the context and the framebuffer, if there is one, are bound, and the viewport is set up by a call to glViewport(). No other state is set and no clearing or drawing is performed by the framework.

Note
When using a partial update behavior, like PartialUpdateBlend, the output of the previous paintGL() call is preserved and, after the additional drawing perfomed in the current invocation of the function, the content is blitted or blended over the content drawn directly to the window in paintUnderGL().
See also
initializeGL(), resizeGL(), paintUnderGL(), paintOverGL(), UpdateBehavior

Reimplemented from QOpenGLWindow.

Reimplemented in Window, and Window.

Definition at line 123 of file main.cpp.

Here is the call graph for this function:

◆ render() [1/2]

void OpenGLWindow::render ( )
virtual

Reimplemented in TriangleWindow, Window, Window, and HelloWindow.

Definition at line 79 of file openglwindow.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ render() [2/2]

void OpenGLWindow::render ( QPainter painter)
virtual

[2]

Reimplemented in Window.

Definition at line 70 of file openglwindow.cpp.

Here is the call graph for this function:

◆ renderLater

void OpenGLWindow::renderLater ( )
slot

[2]

[3]

Definition at line 95 of file openglwindow.cpp.

Here is the caller graph for this function:

◆ renderNow

void OpenGLWindow::renderNow ( )
slot

[3]

[4]

Definition at line 121 of file openglwindow.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resizeGL()

void OpenGLWindow::resizeGL ( int  w,
int  h 
)
overrideprotectedvirtual

This virtual function is called whenever the widget has been resized. Reimplement it in a subclass. The new size is passed in w and h.

Note
This is merely a convenience function in order to provide an API that is compatible with QOpenGLWidget. Unlike with QOpenGLWidget, derived classes are free to choose to override resizeEvent() instead of this function.
Avoid issuing OpenGL commands from this function as there may not be a context current when it is invoked. If it cannot be avoided, call makeCurrent().
Scheduling updates from here is not necessary. The windowing systems will send expose events that trigger an update automatically.
See also
initializeGL(), paintGL()

Reimplemented from QOpenGLWindow.

Reimplemented in Window.

Definition at line 147 of file main.cpp.

Here is the call graph for this function:

◆ setAnimating()

void OpenGLWindow::setAnimating ( bool  animating)

[4]

[5]

Definition at line 153 of file openglwindow.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: