Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QOpenGLSharedResourceGuard Class Reference

The QOpenGLSharedResourceGuard class is a convenience sub-class of QOpenGLSharedResource to be used to track a single OpenGL object with a GLuint identifier. The constructor takes a function pointer to a function that will be used to free the resource if and when necessary. \inmodule QtGui. More...

#include <qopenglcontext_p.h>

+ Inheritance diagram for QOpenGLSharedResourceGuard:
+ Collaboration diagram for QOpenGLSharedResourceGuard:

Public Types

typedef void(* FreeResourceFunc) (QOpenGLFunctions *functions, GLuint id)
 

Public Member Functions

 QOpenGLSharedResourceGuard (QOpenGLContext *context, GLuint id, FreeResourceFunc func)
 
 ~QOpenGLSharedResourceGuard () override
 
GLuint id () const
 
- Public Member Functions inherited from QOpenGLSharedResource
 QOpenGLSharedResource (QOpenGLContextGroup *group)
 
virtual ~QOpenGLSharedResource ()=0
 
QOpenGLContextGroupgroup () const
 
void free ()
 

Protected Member Functions

void invalidateResource () override
 
void freeResource (QOpenGLContext *context) override
 

Detailed Description

The QOpenGLSharedResourceGuard class is a convenience sub-class of QOpenGLSharedResource to be used to track a single OpenGL object with a GLuint identifier. The constructor takes a function pointer to a function that will be used to free the resource if and when necessary. \inmodule QtGui.

Since
5.0

Definition at line 67 of file qopenglcontext_p.h.

Member Typedef Documentation

◆ FreeResourceFunc

typedef void(* QOpenGLSharedResourceGuard::FreeResourceFunc) (QOpenGLFunctions *functions, GLuint id)

Definition at line 70 of file qopenglcontext_p.h.

Constructor & Destructor Documentation

◆ QOpenGLSharedResourceGuard()

QOpenGLSharedResourceGuard::QOpenGLSharedResourceGuard ( QOpenGLContext * context,
GLuint id,
FreeResourceFunc func )
inline

Definition at line 71 of file qopenglcontext_p.h.

◆ ~QOpenGLSharedResourceGuard()

QOpenGLSharedResourceGuard::~QOpenGLSharedResourceGuard ( )
overridedefault

Member Function Documentation

◆ freeResource()

void QOpenGLSharedResourceGuard::freeResource ( QOpenGLContext * context)
overrideprotectedvirtual

Implements QOpenGLSharedResource.

Definition at line 1192 of file qopenglcontext.cpp.

References context.

◆ id()

GLuint QOpenGLSharedResourceGuard::id ( ) const
inline

Definition at line 79 of file qopenglcontext_p.h.

Referenced by QOpenGLShaderPrivate::compile(), and QOpenGLFramebufferObjectPrivate::fbo().

+ Here is the caller graph for this function:

◆ invalidateResource()

void QOpenGLSharedResourceGuard::invalidateResource ( )
inlineoverrideprotectedvirtual

Implements QOpenGLSharedResource.

Definition at line 82 of file qopenglcontext_p.h.


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