Qt 4.8
Public Functions | Static Public Functions | Public Variables | Static Public Variables | List of all members
QPlatformGLContextPrivate Class Reference

Public Functions

 QPlatformGLContextPrivate ()
 
virtual ~QPlatformGLContextPrivate ()
 

Static Public Functions

static void setCurrentContext (QPlatformGLContext *context)
 

Public Variables

void(* qGLContextDeleteFunction )(void *handle)
 
void * qGLContextHandle
 

Static Public Variables

static QPlatformGLContextstaticSharedContext = 0
 

Detailed Description

Definition at line 61 of file qplatformglcontext_qpa.cpp.

Constructors and Destructors

◆ QPlatformGLContextPrivate()

QPlatformGLContextPrivate::QPlatformGLContextPrivate ( )
inline

Definition at line 64 of file qplatformglcontext_qpa.cpp.

66  {
67  }

◆ ~QPlatformGLContextPrivate()

virtual QPlatformGLContextPrivate::~QPlatformGLContextPrivate ( )
inlinevirtual

Definition at line 69 of file qplatformglcontext_qpa.cpp.

70  {
71  //do not delete the QGLContext handle here as it is deleted in
72  //QWidgetPrivate::deleteTLSysExtra()
73  }

Functions

◆ setCurrentContext()

void QPlatformGLContextPrivate::setCurrentContext ( QPlatformGLContext context)
static

Definition at line 83 of file qplatformglcontext_qpa.cpp.

Referenced by QPlatformGLContext::doneCurrent(), and QPlatformGLContext::makeCurrent().

84 {
85  QPlatformGLThreadContext *threadContext = qplatformgl_context_storage.localData();
86  if (!threadContext) {
87  if (!QThread::currentThread()) {
88  qWarning("No QTLS available. currentContext wont work");
89  return;
90  }
91  threadContext = new QPlatformGLThreadContext;
92  qplatformgl_context_storage.setLocalData(threadContext);
93  }
94  threadContext->context = context;
95 }
static QThreadStorage< QPlatformGLThreadContext * > qplatformgl_context_storage
static QThread * currentThread()
Returns a pointer to a QThread which manages the currently executing thread.
Definition: qthread.cpp:419
Q_CORE_EXPORT void qWarning(const char *,...)

Properties

◆ qGLContextDeleteFunction

void(* QPlatformGLContextPrivate::qGLContextDeleteFunction) (void *handle)

Definition at line 75 of file qplatformglcontext_qpa.cpp.

◆ qGLContextHandle

void* QPlatformGLContextPrivate::qGLContextHandle

Definition at line 74 of file qplatformglcontext_qpa.cpp.

◆ staticSharedContext

QPlatformGLContext * QPlatformGLContextPrivate::staticSharedContext = 0
static

Definition at line 76 of file qplatformglcontext_qpa.cpp.


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