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
qwindowsopenglcontext.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QWINDOWSOPENGLCONTEXT_H
5#define QWINDOWSOPENGLCONTEXT_H
6
7#include <QtGui/qopenglcontext.h>
8#include <qpa/qplatformopenglcontext.h>
9
11
12#ifndef QT_NO_OPENGL
13
15
17{
18 Q_DISABLE_COPY_MOVE(QWindowsStaticOpenGLContext)
19public:
21 virtual ~QWindowsStaticOpenGLContext() = default;
22
25 virtual void *moduleHandle() const = 0;
27 virtual bool supportsThreadedOpenGL() const { return false; }
28
29 // If the windowing system interface needs explicitly created window surfaces (like EGL),
30 // reimplement these.
31 virtual void *createWindowSurface(void * /*nativeWindow*/, void * /*nativeConfig*/, int * /*err*/) { return nullptr; }
32 virtual void destroyWindowSurface(void * /*nativeSurface*/) { }
33
34protected:
36
37private:
38 static QWindowsStaticOpenGLContext *doCreate();
39};
40
42{
43 Q_DISABLE_COPY_MOVE(QWindowsOpenGLContext)
44public:
45 // These should be implemented only for some winsys interfaces, for example EGL.
46 // For others, like WGL, they are not relevant.
47 virtual void *nativeDisplay() const { return nullptr; }
48 virtual void *nativeConfig() const { return 0; }
49
50protected:
52};
53
54#endif // QT_NO_OPENGL
55
57
58#endif // QWINDOWSOPENGLCONTEXT_H
\inmodule QtGui
OpenGLModuleType
This enum defines the type of the underlying OpenGL implementation.
The QPlatformOpenGLContext class provides an abstraction for native GL contexts.
virtual void * nativeDisplay() const
QWindowsOpenGLContext()=default
virtual void * nativeConfig() const
virtual ~QWindowsStaticOpenGLContext()=default
virtual void * createWindowSurface(void *, void *, int *)
virtual QOpenGLContext::OpenGLModuleType moduleType() const =0
virtual void * moduleHandle() const =0
virtual QWindowsOpenGLContext * createContext(HGLRC context, HWND window)=0
static QWindowsStaticOpenGLContext * create()
virtual void destroyWindowSurface(void *)
virtual QWindowsOpenGLContext * createContext(QOpenGLContext *context)=0
virtual bool supportsThreadedOpenGL() const
Combined button and popup list for selecting options.
static void * context
aWidget window() -> setWindowTitle("New Window Title")
[2]