Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QCocoaGLContext Class Reference

#include <qcocoaglcontext.h>

Inheritance diagram for QCocoaGLContext:
Collaboration diagram for QCocoaGLContext:

Public Member Functions

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

Friends

QDebug operator<< (QDebug debug, const QCocoaGLContext *screen)

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 23 of file qcocoaglcontext.h.

Constructor & Destructor Documentation

◆ QCocoaGLContext() [1/2]

QCocoaGLContext::QCocoaGLContext ( QOpenGLContext * context)

Definition at line 32 of file qcocoaglcontext.mm.

References QCocoaGLContext().

Referenced by QCocoaGLContext(), and QCocoaGLContext().

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

◆ QCocoaGLContext() [2/2]

QCocoaGLContext::QCocoaGLContext ( NSOpenGLContext * context)

Definition at line 38 of file qcocoaglcontext.mm.

References QCocoaGLContext().

Here is the call graph for this function:

◆ ~QCocoaGLContext()

QCocoaGLContext::~QCocoaGLContext ( )

Definition at line 323 of file qcocoaglcontext.mm.

Member Function Documentation

◆ beginFrame()

void QCocoaGLContext::beginFrame ( )
overridevirtual

Called when the RHI begins rendering a new frame in the context.

Will always be paired with a call to \l endFrame().

Reimplemented from QPlatformOpenGLContext.

Definition at line 350 of file qcocoaglcontext.mm.

References update().

Here is the call graph for this function:

◆ doneCurrent()

void QCocoaGLContext::doneCurrent ( )
overridevirtual

Implements QPlatformOpenGLContext.

Definition at line 524 of file qcocoaglcontext.mm.

◆ format()

QSurfaceFormat QCocoaGLContext::format ( ) const
overridevirtual

Implements QPlatformOpenGLContext.

Definition at line 538 of file qcocoaglcontext.mm.

◆ getProcAddress()

QFunctionPointer QCocoaGLContext::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 563 of file qcocoaglcontext.mm.

◆ initialize()

void QCocoaGLContext::initialize ( )
overridevirtual

Called after a new instance is constructed.

The default implementation does nothing.

Subclasses can use this function to perform additional initialization that relies on virtual functions.

Reimplemented from QPlatformOpenGLContext.

Definition at line 44 of file qcocoaglcontext.mm.

◆ isSharing()

bool QCocoaGLContext::isSharing ( ) const
overridevirtual

Reimplemented from QPlatformOpenGLContext.

Definition at line 548 of file qcocoaglcontext.mm.

◆ isSoftwareContext()

bool QCocoaGLContext::isSoftwareContext ( ) const

Definition at line 553 of file qcocoaglcontext.mm.

◆ isValid()

bool QCocoaGLContext::isValid ( ) const
overridevirtual

Reimplemented from QPlatformOpenGLContext.

Definition at line 543 of file qcocoaglcontext.mm.

◆ makeCurrent()

bool QCocoaGLContext::makeCurrent ( QPlatformSurface * surface)
overridevirtual

Implements QPlatformOpenGLContext.

Definition at line 328 of file qcocoaglcontext.mm.

References update().

Here is the call graph for this function:

◆ nativeContext()

NSOpenGLContext * QCocoaGLContext::nativeContext ( ) const
override
Returns
the underlying NSOpenGLContext.

Definition at line 558 of file qcocoaglcontext.mm.

◆ swapBuffers()

void QCocoaGLContext::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 491 of file qcocoaglcontext.mm.

◆ update()

void QCocoaGLContext::update ( )

Definition at line 456 of file qcocoaglcontext.mm.

Referenced by beginFrame(), and makeCurrent().

Here is the caller graph for this function:

◆ operator<<

QDebug operator<< ( QDebug debug,
const QCocoaGLContext * screen )
friend

Definition at line 569 of file qcocoaglcontext.mm.


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