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 28 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 34 of file qcocoaglcontext.mm.

References QCocoaGLContext().

Here is the call graph for this function:

◆ ~QCocoaGLContext()

QCocoaGLContext::~QCocoaGLContext ( )

Definition at line 312 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 339 of file qcocoaglcontext.mm.

References update().

Here is the call graph for this function:

◆ doneCurrent()

void QCocoaGLContext::doneCurrent ( )
overridevirtual

Implements QPlatformOpenGLContext.

Definition at line 490 of file qcocoaglcontext.mm.

◆ format()

QSurfaceFormat QCocoaGLContext::format ( ) const
overridevirtual

Implements QPlatformOpenGLContext.

Definition at line 504 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 529 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 40 of file qcocoaglcontext.mm.

◆ isSharing()

bool QCocoaGLContext::isSharing ( ) const
overridevirtual

Reimplemented from QPlatformOpenGLContext.

Definition at line 514 of file qcocoaglcontext.mm.

◆ isSoftwareContext()

bool QCocoaGLContext::isSoftwareContext ( ) const

Definition at line 519 of file qcocoaglcontext.mm.

◆ isValid()

bool QCocoaGLContext::isValid ( ) const
overridevirtual

Reimplemented from QPlatformOpenGLContext.

Definition at line 509 of file qcocoaglcontext.mm.

◆ makeCurrent()

bool QCocoaGLContext::makeCurrent ( QPlatformSurface * surface)
overridevirtual

Implements QPlatformOpenGLContext.

Definition at line 317 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 524 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 457 of file qcocoaglcontext.mm.

◆ update()

void QCocoaGLContext::update ( )

Definition at line 445 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 535 of file qcocoaglcontext.mm.


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