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
QWasmOpenGLContext Class Reference

#include <qwasmopenglcontext.h>

+ Inheritance diagram for QWasmOpenGLContext:
+ Collaboration diagram for QWasmOpenGLContext:

Public Member Functions

 QWasmOpenGLContext (QOpenGLContext *context)
 
 ~QWasmOpenGLContext ()
 
QSurfaceFormat format () const override
 
void swapBuffers (QPlatformSurface *surface) override
 Reimplement in subclass to native swap buffers calls.
 
GLuint defaultFramebufferObject (QPlatformSurface *surface) const override
 Reimplement in subclass if your platform uses framebuffer objects for surfaces.
 
bool makeCurrent (QPlatformSurface *surface) override
 
void doneCurrent () override
 
bool isSharing () const override
 
bool isValid () const override
 
QFunctionPointer getProcAddress (const char *procName) override
 Reimplement in subclass to allow dynamic querying of OpenGL symbols.
 
- Public Member Functions inherited from QPlatformOpenGLContext
 QPlatformOpenGLContext ()
 
virtual ~QPlatformOpenGLContext ()
 
virtual void initialize ()
 Called after a new instance is constructed.
 
virtual void beginFrame ()
 Called when the RHI begins rendering a new frame in the context.
 
virtual void endFrame ()
 Called when the RHI ends rendering a in the context.
 
QOpenGLContextcontext () const
 

Additional Inherited Members

- Static Public Member Functions inherited from QPlatformOpenGLContext
static bool parseOpenGLVersion (const QByteArray &versionString, int &major, int &minor)
 

Detailed Description

Definition at line 17 of file qwasmopenglcontext.h.

Constructor & Destructor Documentation

◆ QWasmOpenGLContext()

QT_BEGIN_NAMESPACE QWasmOpenGLContext::QWasmOpenGLContext ( QOpenGLContext * context)
explicit

Definition at line 23 of file qwasmopenglcontext.cpp.

References QSurfaceFormat::depthBufferSize(), QSurfaceFormat::OpenGLES, QSurfaceFormat::setDepthBufferSize(), QSurfaceFormat::setRenderableType(), QSurfaceFormat::setStencilBufferSize(), and QSurfaceFormat::stencilBufferSize().

+ Here is the call graph for this function:

◆ ~QWasmOpenGLContext()

QWasmOpenGLContext::~QWasmOpenGLContext ( )

Definition at line 36 of file qwasmopenglcontext.cpp.

Member Function Documentation

◆ defaultFramebufferObject()

GLuint QWasmOpenGLContext::defaultFramebufferObject ( QPlatformSurface * surface) const
overridevirtual

Reimplement in subclass if your platform uses framebuffer objects for surfaces.

The default implementation returns 0.

Reimplemented from QPlatformOpenGLContext.

Definition at line 148 of file qwasmopenglcontext.cpp.

References QPlatformOpenGLContext::defaultFramebufferObject().

+ Here is the call graph for this function:

◆ doneCurrent()

void QWasmOpenGLContext::doneCurrent ( )
overridevirtual

Implements QPlatformOpenGLContext.

Definition at line 179 of file qwasmopenglcontext.cpp.

◆ format()

QSurfaceFormat QWasmOpenGLContext::format ( ) const
overridevirtual

Implements QPlatformOpenGLContext.

Definition at line 143 of file qwasmopenglcontext.cpp.

◆ getProcAddress()

QFunctionPointer QWasmOpenGLContext::getProcAddress ( const char * procName)
overridevirtual

Reimplement in subclass to allow dynamic querying of OpenGL symbols.

As opposed to e.g. the wglGetProcAddress function on Windows, Qt expects this methods to be able to return valid function pointers even for standard OpenGL symbols.

Implements QPlatformOpenGLContext.

Definition at line 199 of file qwasmopenglcontext.cpp.

◆ isSharing()

bool QWasmOpenGLContext::isSharing ( ) const
overridevirtual

Reimplemented from QPlatformOpenGLContext.

Definition at line 184 of file qwasmopenglcontext.cpp.

References QOpenGLContext::shareContext().

Referenced by makeCurrent().

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

◆ isValid()

bool QWasmOpenGLContext::isValid ( ) const
overridevirtual

Reimplemented from QPlatformOpenGLContext.

Definition at line 189 of file qwasmopenglcontext.cpp.

◆ makeCurrent()

bool QWasmOpenGLContext::makeCurrent ( QPlatformSurface * surface)
overridevirtual

Implements QPlatformOpenGLContext.

Definition at line 153 of file qwasmopenglcontext.cpp.

References QPlatformOpenGLContext::context(), isSharing(), qWarning, QOpenGLContext::shareContext(), and QPlatformSurface::surface().

+ Here is the call graph for this function:

◆ swapBuffers()

void QWasmOpenGLContext::swapBuffers ( QPlatformSurface * surface)
overridevirtual

Reimplement in subclass to native swap buffers calls.

The implementation must support being called in a thread different than the gui-thread.

Implements QPlatformOpenGLContext.

Definition at line 173 of file qwasmopenglcontext.cpp.

References Q_UNUSED.


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