Move versioned OpenGL functions from QtGui to QtOpenGL
The context—which lives in QtGui—now knows nothing about versioned functions. This changes the public API for getting version functions for a context. [ChangeLog][QtGui][OpenGL] QOpenGLContext::versionFunctions() has been removed. QOpenGLVersionFunctionsFactory::get() from the QtOpenGL module should be used instead. Previously one would call context->versionFunctions<QOpenGLFunctions_4_0_Core>(); Which now becomes QOpenGLVersionFunctionsFactory::get<QOpenGLFunctions_4_0_Core>(context); The rest of the API should be identical. Since glgen no longer compiles, and the links to its input (gl.spec and gl.tm) are dead, I've edited the previously generated files manually. If glgen is fixed, it should be quite easy to make it generate the new way. Task-number: QTBUG-74409 Change-Id: I800527e0af16a79005b276eeb74417770193c62f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This commit is contained in:
parent
ca635c659c
commit
73f3f501f3
@ -260,9 +260,6 @@ qt_extend_target(Gui CONDITION QT_FEATURE_opengl
|
||||
opengl/qopenglextrafunctions.h
|
||||
opengl/qopenglfunctions.cpp opengl/qopenglfunctions.h
|
||||
opengl/qopenglprogrambinarycache.cpp opengl/qopenglprogrambinarycache_p.h
|
||||
opengl/qopenglversionfunctions.cpp opengl/qopenglversionfunctions.h
|
||||
opengl/qopenglversionfunctionsfactory.cpp opengl/qopenglversionfunctionsfactory_p.h
|
||||
opengl/qopenglversionprofile.cpp opengl/qopenglversionprofile.h
|
||||
rhi/qrhigles2.cpp rhi/qrhigles2_p.h
|
||||
rhi/qrhigles2_p_p.h
|
||||
)
|
||||
@ -569,41 +566,6 @@ qt_extend_target(Gui CONDITION QT_FEATURE_undogroup
|
||||
util/qundogroup.cpp util/qundogroup.h
|
||||
)
|
||||
|
||||
qt_extend_target(Gui CONDITION QT_FEATURE_opengl AND NOT QT_FEATURE_opengles2
|
||||
SOURCES
|
||||
opengl/qopenglfunctions_1_0.cpp opengl/qopenglfunctions_1_0.h
|
||||
opengl/qopenglfunctions_1_1.cpp opengl/qopenglfunctions_1_1.h
|
||||
opengl/qopenglfunctions_1_2.cpp opengl/qopenglfunctions_1_2.h
|
||||
opengl/qopenglfunctions_1_3.cpp opengl/qopenglfunctions_1_3.h
|
||||
opengl/qopenglfunctions_1_4.cpp opengl/qopenglfunctions_1_4.h
|
||||
opengl/qopenglfunctions_1_5.cpp opengl/qopenglfunctions_1_5.h
|
||||
opengl/qopenglfunctions_2_0.cpp opengl/qopenglfunctions_2_0.h
|
||||
opengl/qopenglfunctions_2_1.cpp opengl/qopenglfunctions_2_1.h
|
||||
opengl/qopenglfunctions_3_0.cpp opengl/qopenglfunctions_3_0.h
|
||||
opengl/qopenglfunctions_3_1.cpp opengl/qopenglfunctions_3_1.h
|
||||
opengl/qopenglfunctions_3_2_compatibility.cpp opengl/qopenglfunctions_3_2_compatibility.h
|
||||
opengl/qopenglfunctions_3_2_core.cpp opengl/qopenglfunctions_3_2_core.h
|
||||
opengl/qopenglfunctions_3_3_compatibility.cpp opengl/qopenglfunctions_3_3_compatibility.h
|
||||
opengl/qopenglfunctions_3_3_core.cpp opengl/qopenglfunctions_3_3_core.h
|
||||
opengl/qopenglfunctions_4_0_compatibility.cpp opengl/qopenglfunctions_4_0_compatibility.h
|
||||
opengl/qopenglfunctions_4_0_core.cpp opengl/qopenglfunctions_4_0_core.h
|
||||
opengl/qopenglfunctions_4_1_compatibility.cpp opengl/qopenglfunctions_4_1_compatibility.h
|
||||
opengl/qopenglfunctions_4_1_core.cpp opengl/qopenglfunctions_4_1_core.h
|
||||
opengl/qopenglfunctions_4_2_compatibility.cpp opengl/qopenglfunctions_4_2_compatibility.h
|
||||
opengl/qopenglfunctions_4_2_core.cpp opengl/qopenglfunctions_4_2_core.h
|
||||
opengl/qopenglfunctions_4_3_compatibility.cpp opengl/qopenglfunctions_4_3_compatibility.h
|
||||
opengl/qopenglfunctions_4_3_core.cpp opengl/qopenglfunctions_4_3_core.h
|
||||
opengl/qopenglfunctions_4_4_compatibility.cpp opengl/qopenglfunctions_4_4_compatibility.h
|
||||
opengl/qopenglfunctions_4_4_core.cpp opengl/qopenglfunctions_4_4_core.h
|
||||
opengl/qopenglfunctions_4_5_compatibility.cpp opengl/qopenglfunctions_4_5_compatibility.h
|
||||
opengl/qopenglfunctions_4_5_core.cpp opengl/qopenglfunctions_4_5_core.h
|
||||
)
|
||||
|
||||
qt_extend_target(Gui CONDITION QT_FEATURE_opengl AND QT_FEATURE_opengles2
|
||||
SOURCES
|
||||
opengl/qopenglfunctions_es2.cpp opengl/qopenglfunctions_es2.h
|
||||
)
|
||||
|
||||
qt_extend_target(Gui CONDITION QT_FEATURE_vulkan
|
||||
SOURCES
|
||||
rhi/qrhivulkan.cpp rhi/qrhivulkan_p.h
|
||||
@ -616,7 +578,7 @@ qt_extend_target(Gui CONDITION QT_FEATURE_vulkan
|
||||
Vulkan::Vulkan_nolink
|
||||
)
|
||||
|
||||
#### Keys ignored in scope 84:.:vulkan:vulkan/vulkan.pri:QT_FEATURE_vkgen:
|
||||
#### Keys ignored in scope 82:.:vulkan:vulkan/vulkan.pri:QT_FEATURE_vkgen:
|
||||
# QMAKE_EXTRA_COMPILERS = "qvkgen_h" "qvkgen_ph" "qvkgen_pimpl"
|
||||
# QMAKE_QVKGEN_INPUT = "vulkan/vk.xml"
|
||||
# QMAKE_QVKGEN_LICENSE_HEADER = "$$QT_SOURCE_TREE/header.LGPL"
|
||||
@ -632,10 +594,10 @@ qt_extend_target(Gui CONDITION QT_FEATURE_vulkan
|
||||
# qvkgen_pimpl.input = "QMAKE_QVKGEN_INPUT"
|
||||
# qvkgen_pimpl.output = "$$OUT_PWD/vulkan/qvulkanfunctions_p.cpp"
|
||||
|
||||
#### Keys ignored in scope 85:.:vulkan:vulkan/vulkan.pri:QT_FEATURE_vulkan:
|
||||
#### Keys ignored in scope 83:.:vulkan:vulkan/vulkan.pri:QT_FEATURE_vulkan:
|
||||
# qvkgen_h.variable_out = "HEADERS"
|
||||
|
||||
#### Keys ignored in scope 86:.:vulkan:vulkan/vulkan.pri:else:
|
||||
#### Keys ignored in scope 84:.:vulkan:vulkan/vulkan.pri:else:
|
||||
# qvkgen_h.CONFIG = "target_predeps" "no_link"
|
||||
|
||||
qt_extend_target(Gui CONDITION WASM
|
||||
|
@ -353,9 +353,6 @@ qt_extend_target(Gui CONDITION QT_FEATURE_opengl
|
||||
opengl/qopenglextrafunctions.h
|
||||
opengl/qopenglfunctions.cpp opengl/qopenglfunctions.h
|
||||
opengl/qopenglprogrambinarycache.cpp opengl/qopenglprogrambinarycache_p.h
|
||||
opengl/qopenglversionfunctions.cpp opengl/qopenglversionfunctions.h
|
||||
opengl/qopenglversionfunctionsfactory.cpp opengl/qopenglversionfunctionsfactory_p.h
|
||||
opengl/qopenglversionprofile.cpp opengl/qopenglversionprofile.h
|
||||
rhi/qrhigles2.cpp rhi/qrhigles2_p.h
|
||||
rhi/qrhigles2_p_p.h
|
||||
)
|
||||
@ -681,41 +678,6 @@ qt_extend_target(Gui CONDITION QT_FEATURE_undogroup
|
||||
util/qundogroup.cpp util/qundogroup.h
|
||||
)
|
||||
|
||||
qt_extend_target(Gui CONDITION QT_FEATURE_opengl AND NOT QT_FEATURE_opengles2
|
||||
SOURCES
|
||||
opengl/qopenglfunctions_1_0.cpp opengl/qopenglfunctions_1_0.h
|
||||
opengl/qopenglfunctions_1_1.cpp opengl/qopenglfunctions_1_1.h
|
||||
opengl/qopenglfunctions_1_2.cpp opengl/qopenglfunctions_1_2.h
|
||||
opengl/qopenglfunctions_1_3.cpp opengl/qopenglfunctions_1_3.h
|
||||
opengl/qopenglfunctions_1_4.cpp opengl/qopenglfunctions_1_4.h
|
||||
opengl/qopenglfunctions_1_5.cpp opengl/qopenglfunctions_1_5.h
|
||||
opengl/qopenglfunctions_2_0.cpp opengl/qopenglfunctions_2_0.h
|
||||
opengl/qopenglfunctions_2_1.cpp opengl/qopenglfunctions_2_1.h
|
||||
opengl/qopenglfunctions_3_0.cpp opengl/qopenglfunctions_3_0.h
|
||||
opengl/qopenglfunctions_3_1.cpp opengl/qopenglfunctions_3_1.h
|
||||
opengl/qopenglfunctions_3_2_compatibility.cpp opengl/qopenglfunctions_3_2_compatibility.h
|
||||
opengl/qopenglfunctions_3_2_core.cpp opengl/qopenglfunctions_3_2_core.h
|
||||
opengl/qopenglfunctions_3_3_compatibility.cpp opengl/qopenglfunctions_3_3_compatibility.h
|
||||
opengl/qopenglfunctions_3_3_core.cpp opengl/qopenglfunctions_3_3_core.h
|
||||
opengl/qopenglfunctions_4_0_compatibility.cpp opengl/qopenglfunctions_4_0_compatibility.h
|
||||
opengl/qopenglfunctions_4_0_core.cpp opengl/qopenglfunctions_4_0_core.h
|
||||
opengl/qopenglfunctions_4_1_compatibility.cpp opengl/qopenglfunctions_4_1_compatibility.h
|
||||
opengl/qopenglfunctions_4_1_core.cpp opengl/qopenglfunctions_4_1_core.h
|
||||
opengl/qopenglfunctions_4_2_compatibility.cpp opengl/qopenglfunctions_4_2_compatibility.h
|
||||
opengl/qopenglfunctions_4_2_core.cpp opengl/qopenglfunctions_4_2_core.h
|
||||
opengl/qopenglfunctions_4_3_compatibility.cpp opengl/qopenglfunctions_4_3_compatibility.h
|
||||
opengl/qopenglfunctions_4_3_core.cpp opengl/qopenglfunctions_4_3_core.h
|
||||
opengl/qopenglfunctions_4_4_compatibility.cpp opengl/qopenglfunctions_4_4_compatibility.h
|
||||
opengl/qopenglfunctions_4_4_core.cpp opengl/qopenglfunctions_4_4_core.h
|
||||
opengl/qopenglfunctions_4_5_compatibility.cpp opengl/qopenglfunctions_4_5_compatibility.h
|
||||
opengl/qopenglfunctions_4_5_core.cpp opengl/qopenglfunctions_4_5_core.h
|
||||
)
|
||||
|
||||
qt_extend_target(Gui CONDITION QT_FEATURE_opengl AND QT_FEATURE_opengles2
|
||||
SOURCES
|
||||
opengl/qopenglfunctions_es2.cpp opengl/qopenglfunctions_es2.h
|
||||
)
|
||||
|
||||
qt_extend_target(Gui CONDITION QT_FEATURE_vulkan
|
||||
SOURCES
|
||||
rhi/qrhivulkan.cpp rhi/qrhivulkan_p.h
|
||||
@ -728,7 +690,7 @@ qt_extend_target(Gui CONDITION QT_FEATURE_vulkan
|
||||
Vulkan::Vulkan_nolink
|
||||
)
|
||||
|
||||
#### Keys ignored in scope 84:.:vulkan:vulkan/vulkan.pri:QT_FEATURE_vkgen:
|
||||
#### Keys ignored in scope 82:.:vulkan:vulkan/vulkan.pri:QT_FEATURE_vkgen:
|
||||
# special case begin
|
||||
# We must always generate syncqt-injected header files,
|
||||
# because we added a custom command earlier for those for framework builds.
|
||||
@ -784,10 +746,10 @@ add_custom_command(
|
||||
# qvkgen_pimpl.input = "QMAKE_QVKGEN_INPUT"
|
||||
# qvkgen_pimpl.output = "$$OUT_PWD/vulkan/qvulkanfunctions_p.cpp"
|
||||
|
||||
#### Keys ignored in scope 85:.:vulkan:vulkan/vulkan.pri:QT_FEATURE_vulkan:
|
||||
#### Keys ignored in scope 83:.:vulkan:vulkan/vulkan.pri:QT_FEATURE_vulkan:
|
||||
# qvkgen_h.variable_out = "HEADERS"
|
||||
|
||||
#### Keys ignored in scope 86:.:vulkan:vulkan/vulkan.pri:else:
|
||||
#### Keys ignored in scope 84:.:vulkan:vulkan/vulkan.pri:else:
|
||||
# qvkgen_h.CONFIG = "target_predeps" "no_link"
|
||||
|
||||
qt_extend_target(Gui CONDITION WASM
|
||||
|
@ -28,36 +28,6 @@
|
||||
/*!
|
||||
\dontdocument (QTypeInfo QScreenOrientationChangeEvent QApplicationStateChangeEvent
|
||||
QMetaTypeId QAbstractUndoItem
|
||||
QOpenGLVersionStatus
|
||||
QOpenGLVersionFunctionsBackend
|
||||
QOpenGLVersionFunctionsStorage
|
||||
QOpenGLFunctions_1_0_CoreBackend
|
||||
QOpenGLFunctions_1_1_CoreBackend
|
||||
QOpenGLFunctions_1_2_CoreBackend
|
||||
QOpenGLFunctions_1_3_CoreBackend
|
||||
QOpenGLFunctions_1_4_CoreBackend
|
||||
QOpenGLFunctions_1_5_CoreBackend
|
||||
QOpenGLFunctions_2_0_CoreBackend
|
||||
QOpenGLFunctions_2_1_CoreBackend
|
||||
QOpenGLFunctions_3_0_CoreBackend
|
||||
QOpenGLFunctions_3_1_CoreBackend
|
||||
QOpenGLFunctions_3_2_CoreBackend
|
||||
QOpenGLFunctions_3_3_CoreBackend
|
||||
QOpenGLFunctions_4_0_CoreBackend
|
||||
QOpenGLFunctions_4_1_CoreBackend
|
||||
QOpenGLFunctions_4_2_CoreBackend
|
||||
QOpenGLFunctions_4_3_CoreBackend
|
||||
QOpenGLFunctions_4_4_CoreBackend
|
||||
QOpenGLFunctions_4_5_CoreBackend
|
||||
QOpenGLFunctions_1_0_DeprecatedBackend
|
||||
QOpenGLFunctions_1_1_DeprecatedBackend
|
||||
QOpenGLFunctions_1_2_DeprecatedBackend
|
||||
QOpenGLFunctions_1_3_DeprecatedBackend
|
||||
QOpenGLFunctions_1_4_DeprecatedBackend
|
||||
QOpenGLFunctions_2_0_DeprecatedBackend
|
||||
QOpenGLFunctions_3_0_DeprecatedBackend
|
||||
QOpenGLFunctions_3_3_DeprecatedBackend
|
||||
QOpenGLFunctions_4_5_DeprecatedBackend
|
||||
QTextFrameLayoutData QPlatformDropQtResponse QPlatformDragQtResponse
|
||||
QPlatformOffscreenSurface QColorDialogOptions QFontDialogOptions
|
||||
QFileDialogOptions QMessageDialogOptions QMessageDialogOptions::CustomButton
|
||||
|
@ -54,15 +54,9 @@
|
||||
#include <qpa/qplatformnativeinterface.h>
|
||||
|
||||
#include <private/qopenglextensions_p.h>
|
||||
#include <private/qopenglversionfunctionsfactory_p.h>
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
#ifndef QT_OPENGL_ES_2
|
||||
#include <QOpenGLFunctions_1_0>
|
||||
#include <QOpenGLFunctions_3_2_Core>
|
||||
#endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QGuiGLThreadContext
|
||||
@ -484,15 +478,6 @@ void QOpenGLContext::destroy()
|
||||
delete d->functions;
|
||||
d->functions = nullptr;
|
||||
|
||||
for (QAbstractOpenGLFunctions *func : qAsConst(d->externalVersionFunctions)) {
|
||||
QAbstractOpenGLFunctionsPrivate *func_d = QAbstractOpenGLFunctionsPrivate::get(func);
|
||||
func_d->owningContext = nullptr;
|
||||
func_d->initialized = false;
|
||||
}
|
||||
d->externalVersionFunctions.clear();
|
||||
qDeleteAll(d->versionFunctions);
|
||||
d->versionFunctions.clear();
|
||||
|
||||
if (d->textureFunctionsDestroyCallback) {
|
||||
d->textureFunctionsDestroyCallback();
|
||||
d->textureFunctionsDestroyCallback = nullptr;
|
||||
@ -588,115 +573,6 @@ QOpenGLExtraFunctions *QOpenGLContext::extraFunctions() const
|
||||
return static_cast<QOpenGLExtraFunctions *>(functions());
|
||||
}
|
||||
|
||||
/*!
|
||||
\fn T *QOpenGLContext::versionFunctions() const
|
||||
|
||||
\overload versionFunctions()
|
||||
|
||||
Returns a pointer to an object that provides access to all functions for
|
||||
the version and profile of this context. There is no need to call
|
||||
QAbstractOpenGLFunctions::initializeOpenGLFunctions() as long as this context
|
||||
is current. It is also possible to call this function when the context is not
|
||||
current, but in that case it is the caller's responsibility to ensure proper
|
||||
initialization by calling QAbstractOpenGLFunctions::initializeOpenGLFunctions()
|
||||
afterwards.
|
||||
|
||||
Usually one would use the template version of this function to automatically
|
||||
have the result cast to the correct type.
|
||||
|
||||
\code
|
||||
QOpenGLFunctions_3_3_Core* funcs = 0;
|
||||
funcs = context->versionFunctions<QOpenGLFunctions_3_3_Core>();
|
||||
if (!funcs) {
|
||||
qWarning() << "Could not obtain required OpenGL context version";
|
||||
exit(1);
|
||||
}
|
||||
\endcode
|
||||
|
||||
It is possible to request a functions object for a different version and profile
|
||||
than that for which the context was created. To do this either use the template
|
||||
version of this function specifying the desired functions object type as the
|
||||
template parameter or by passing in a QOpenGLVersionProfile object as an argument
|
||||
to the non-template function.
|
||||
|
||||
Note that requests for function objects of other versions or profiles can fail and
|
||||
in doing so will return \nullptr. Situations in which creation of the functions
|
||||
object can fail are if the request cannot be satisfied due to asking for functions
|
||||
that are not in the version or profile of this context. For example:
|
||||
|
||||
\list
|
||||
\li Requesting a 3.3 core profile functions object would succeed.
|
||||
\li Requesting a 3.3 compatibility profile functions object would fail. We would fail
|
||||
to resolve the deprecated functions.
|
||||
\li Requesting a 4.3 core profile functions object would fail. We would fail to resolve
|
||||
the new core functions introduced in versions 4.0-4.3.
|
||||
\li Requesting a 3.1 functions object would succeed. There is nothing in 3.1 that is not
|
||||
also in 3.3 core.
|
||||
\endlist
|
||||
|
||||
Note that if creating a functions object via this method that the QOpenGLContext
|
||||
retains ownership of the object. This is to allow the object to be cached and shared.
|
||||
*/
|
||||
|
||||
/*!
|
||||
Returns a pointer to an object that provides access to all functions for the
|
||||
\a versionProfile of this context. There is no need to call
|
||||
QAbstractOpenGLFunctions::initializeOpenGLFunctions() as long as this context
|
||||
is current. It is also possible to call this function when the context is not
|
||||
current, but in that case it is the caller's responsibility to ensure proper
|
||||
initialization by calling QAbstractOpenGLFunctions::initializeOpenGLFunctions()
|
||||
afterwards.
|
||||
|
||||
Usually one would use the template version of this function to automatically
|
||||
have the result cast to the correct type.
|
||||
*/
|
||||
QAbstractOpenGLFunctions *QOpenGLContext::versionFunctions(const QOpenGLVersionProfile &versionProfile) const
|
||||
{
|
||||
#ifndef QT_OPENGL_ES_2
|
||||
if (isOpenGLES()) {
|
||||
qWarning("versionFunctions: Not supported on OpenGL ES");
|
||||
return nullptr;
|
||||
}
|
||||
#endif // QT_OPENGL_ES_2
|
||||
|
||||
Q_D(const QOpenGLContext);
|
||||
const QSurfaceFormat f = format();
|
||||
|
||||
// Ensure we have a valid version and profile. Default to context's if none specified
|
||||
QOpenGLVersionProfile vp = versionProfile;
|
||||
if (!vp.isValid())
|
||||
vp = QOpenGLVersionProfile(f);
|
||||
|
||||
// Check that context is compatible with requested version
|
||||
const QPair<int, int> v = qMakePair(f.majorVersion(), f.minorVersion());
|
||||
if (v < vp.version())
|
||||
return nullptr;
|
||||
|
||||
// If this context only offers core profile functions then we can't create
|
||||
// function objects for legacy or compatibility profile requests
|
||||
if (((vp.hasProfiles() && vp.profile() != QSurfaceFormat::CoreProfile) || vp.isLegacyVersion())
|
||||
&& f.profile() == QSurfaceFormat::CoreProfile)
|
||||
return nullptr;
|
||||
|
||||
// Create object if suitable one not cached
|
||||
QAbstractOpenGLFunctions* funcs = nullptr;
|
||||
auto it = d->versionFunctions.constFind(vp);
|
||||
if (it == d->versionFunctions.constEnd()) {
|
||||
funcs = QOpenGLVersionFunctionsFactory::create(vp);
|
||||
if (funcs) {
|
||||
funcs->setOwningContext(this);
|
||||
d->versionFunctions.insert(vp, funcs);
|
||||
}
|
||||
} else {
|
||||
funcs = it.value();
|
||||
}
|
||||
|
||||
if (funcs && QOpenGLContext::currentContext() == this)
|
||||
funcs->initializeOpenGLFunctions();
|
||||
|
||||
return funcs;
|
||||
}
|
||||
|
||||
/*!
|
||||
Returns the set of OpenGL extensions supported by this context.
|
||||
|
||||
@ -1143,33 +1019,6 @@ QOpenGLContext *QOpenGLContext::globalShareContext()
|
||||
return qt_gl_global_share_context();
|
||||
}
|
||||
|
||||
/*!
|
||||
\internal
|
||||
*/
|
||||
QOpenGLVersionFunctionsStorage *QOpenGLContext::functionsBackendStorage() const
|
||||
{
|
||||
Q_D(const QOpenGLContext);
|
||||
return &d->versionFunctionsStorage;
|
||||
}
|
||||
|
||||
/*!
|
||||
\internal
|
||||
*/
|
||||
void QOpenGLContext::insertExternalFunctions(QAbstractOpenGLFunctions *f)
|
||||
{
|
||||
Q_D(QOpenGLContext);
|
||||
d->externalVersionFunctions.insert(f);
|
||||
}
|
||||
|
||||
/*!
|
||||
\internal
|
||||
*/
|
||||
void QOpenGLContext::removeExternalFunctions(QAbstractOpenGLFunctions *f)
|
||||
{
|
||||
Q_D(QOpenGLContext);
|
||||
d->externalVersionFunctions.remove(f);
|
||||
}
|
||||
|
||||
/*!
|
||||
\internal
|
||||
*/
|
||||
|
@ -58,9 +58,6 @@
|
||||
#endif
|
||||
|
||||
#include <QtGui/qopengl.h>
|
||||
#include <QtGui/qopenglversionfunctions.h>
|
||||
// TODO: ideally get rid of this include
|
||||
#include <QtGui/qopenglversionprofile.h>
|
||||
|
||||
#include <QtCore/qvariant.h>
|
||||
|
||||
@ -141,15 +138,6 @@ public:
|
||||
QOpenGLFunctions *functions() const;
|
||||
QOpenGLExtraFunctions *extraFunctions() const;
|
||||
|
||||
QAbstractOpenGLFunctions *versionFunctions(const QOpenGLVersionProfile &versionProfile = QOpenGLVersionProfile()) const;
|
||||
|
||||
template<class TYPE>
|
||||
TYPE *versionFunctions() const
|
||||
{
|
||||
QOpenGLVersionProfile v = TYPE::versionProfile();
|
||||
return static_cast<TYPE*>(versionFunctions(v));
|
||||
}
|
||||
|
||||
QSet<QByteArray> extensions() const;
|
||||
bool hasExtension(const QByteArray &extension) const;
|
||||
|
||||
@ -185,10 +173,6 @@ private:
|
||||
friend class QAbstractOpenGLFunctionsPrivate;
|
||||
friend class QOpenGLTexturePrivate;
|
||||
|
||||
QOpenGLVersionFunctionsStorage* functionsBackendStorage() const;
|
||||
void insertExternalFunctions(QAbstractOpenGLFunctions *f);
|
||||
void removeExternalFunctions(QAbstractOpenGLFunctions *f);
|
||||
|
||||
QOpenGLTextureHelper* textureFunctions() const;
|
||||
void setTextureFunctions(QOpenGLTextureHelper* textureFuncs, std::function<void()> destroyCallback);
|
||||
|
||||
|
@ -222,10 +222,6 @@ public:
|
||||
//QWidgetPrivate::deleteTLSysExtra()
|
||||
}
|
||||
|
||||
mutable QHash<QOpenGLVersionProfile, QAbstractOpenGLFunctions *> versionFunctions;
|
||||
mutable QOpenGLVersionFunctionsStorage versionFunctionsStorage;
|
||||
mutable QSet<QAbstractOpenGLFunctions *> externalVersionFunctions;
|
||||
|
||||
QSurfaceFormat requestedFormat;
|
||||
QPlatformOpenGLContext *platformGLContext;
|
||||
QOpenGLContext *shareContext;
|
||||
|
@ -4,83 +4,14 @@ qtConfig(opengl): CONFIG += opengl
|
||||
qtConfig(opengles2): CONFIG += opengles2
|
||||
|
||||
qtConfig(opengl) {
|
||||
|
||||
HEADERS += opengl/qopengl.h \
|
||||
opengl/qopengl_p.h \
|
||||
opengl/qopenglfunctions.h \
|
||||
opengl/qopenglextensions_p.h \
|
||||
opengl/qopenglversionfunctions.h \
|
||||
opengl/qopenglversionfunctionsfactory_p.h \
|
||||
opengl/qopenglversionprofile.h \
|
||||
opengl/qopenglextrafunctions.h \
|
||||
opengl/qopenglprogrambinarycache_p.h
|
||||
|
||||
SOURCES += opengl/qopengl.cpp \
|
||||
opengl/qopenglfunctions.cpp \
|
||||
opengl/qopenglversionfunctions.cpp \
|
||||
opengl/qopenglversionfunctionsfactory.cpp \
|
||||
opengl/qopenglversionprofile.cpp \
|
||||
opengl/qopenglprogrambinarycache.cpp
|
||||
|
||||
!qtConfig(opengles2) {
|
||||
HEADERS += opengl/qopenglfunctions_1_0.h \
|
||||
opengl/qopenglfunctions_1_1.h \
|
||||
opengl/qopenglfunctions_1_2.h \
|
||||
opengl/qopenglfunctions_1_3.h \
|
||||
opengl/qopenglfunctions_1_4.h \
|
||||
opengl/qopenglfunctions_1_5.h \
|
||||
opengl/qopenglfunctions_2_0.h \
|
||||
opengl/qopenglfunctions_2_1.h \
|
||||
opengl/qopenglfunctions_3_0.h \
|
||||
opengl/qopenglfunctions_3_1.h \
|
||||
opengl/qopenglfunctions_3_2_core.h \
|
||||
opengl/qopenglfunctions_3_3_core.h \
|
||||
opengl/qopenglfunctions_4_0_core.h \
|
||||
opengl/qopenglfunctions_4_1_core.h \
|
||||
opengl/qopenglfunctions_4_2_core.h \
|
||||
opengl/qopenglfunctions_4_3_core.h \
|
||||
opengl/qopenglfunctions_4_4_core.h \
|
||||
opengl/qopenglfunctions_4_5_core.h \
|
||||
opengl/qopenglfunctions_3_2_compatibility.h \
|
||||
opengl/qopenglfunctions_3_3_compatibility.h \
|
||||
opengl/qopenglfunctions_4_0_compatibility.h \
|
||||
opengl/qopenglfunctions_4_1_compatibility.h \
|
||||
opengl/qopenglfunctions_4_2_compatibility.h \
|
||||
opengl/qopenglfunctions_4_3_compatibility.h \
|
||||
opengl/qopenglfunctions_4_4_compatibility.h \
|
||||
opengl/qopenglfunctions_4_5_compatibility.h
|
||||
|
||||
SOURCES += opengl/qopenglfunctions_1_0.cpp \
|
||||
opengl/qopenglfunctions_1_1.cpp \
|
||||
opengl/qopenglfunctions_1_2.cpp \
|
||||
opengl/qopenglfunctions_1_3.cpp \
|
||||
opengl/qopenglfunctions_1_4.cpp \
|
||||
opengl/qopenglfunctions_1_5.cpp \
|
||||
opengl/qopenglfunctions_2_0.cpp \
|
||||
opengl/qopenglfunctions_2_1.cpp \
|
||||
opengl/qopenglfunctions_3_0.cpp \
|
||||
opengl/qopenglfunctions_3_1.cpp \
|
||||
opengl/qopenglfunctions_3_2_core.cpp \
|
||||
opengl/qopenglfunctions_3_3_core.cpp \
|
||||
opengl/qopenglfunctions_4_0_core.cpp \
|
||||
opengl/qopenglfunctions_4_1_core.cpp \
|
||||
opengl/qopenglfunctions_4_2_core.cpp \
|
||||
opengl/qopenglfunctions_4_3_core.cpp \
|
||||
opengl/qopenglfunctions_4_4_core.cpp \
|
||||
opengl/qopenglfunctions_4_5_core.cpp \
|
||||
opengl/qopenglfunctions_3_2_compatibility.cpp \
|
||||
opengl/qopenglfunctions_3_3_compatibility.cpp \
|
||||
opengl/qopenglfunctions_4_0_compatibility.cpp \
|
||||
opengl/qopenglfunctions_4_1_compatibility.cpp \
|
||||
opengl/qopenglfunctions_4_2_compatibility.cpp \
|
||||
opengl/qopenglfunctions_4_3_compatibility.cpp \
|
||||
opengl/qopenglfunctions_4_4_compatibility.cpp \
|
||||
opengl/qopenglfunctions_4_5_compatibility.cpp
|
||||
}
|
||||
|
||||
qtConfig(opengles2) {
|
||||
HEADERS += opengl/qopenglfunctions_es2.h
|
||||
|
||||
SOURCES += opengl/qopenglfunctions_es2.cpp
|
||||
}
|
||||
}
|
||||
|
@ -7,20 +7,28 @@
|
||||
qt_add_module(OpenGL
|
||||
SOURCES
|
||||
qopengl2pexvertexarray.cpp qopengl2pexvertexarray_p.h
|
||||
qopenglbuffer.cpp qopenglbuffer.h
|
||||
qopenglcustomshaderstage.cpp qopenglcustomshaderstage_p.h
|
||||
qopengldebug.cpp qopengldebug.h
|
||||
qopenglengineshadermanager.cpp qopenglengineshadermanager_p.h
|
||||
qopenglengineshadersource_p.h
|
||||
qopenglframebufferobject.cpp qopenglframebufferobject.h qopenglframebufferobject_p.h
|
||||
qopenglgradientcache.cpp qopenglgradientcache_p.h
|
||||
qopenglpaintdevice.cpp qopenglpaintdevice.h qopenglpaintdevice_p.h
|
||||
qopenglpaintengine.cpp qopenglpaintengine_p.h
|
||||
qopenglpixeltransferoptions.cpp qopenglpixeltransferoptions.h
|
||||
qopenglshadercache_p.h
|
||||
qopenglshaderprogram.cpp qopenglshaderprogram.h
|
||||
qopengltexture.cpp qopengltexture.h qopengltexture_p.h
|
||||
qopengltextureblitter.cpp qopengltextureblitter.h
|
||||
qopengltexturecache.cpp qopengltexturecache_p.h
|
||||
qopengltextureglyphcache.cpp qopengltextureglyphcache_p.h
|
||||
qopengltexturehelper.cpp qopengltexturehelper_p.h
|
||||
qopengltextureuploader.cpp qopengltextureuploader_p.h
|
||||
qopenglversionfunctions.cpp qopenglversionfunctions.h qopenglversionfunctions_p.h
|
||||
qopenglversionfunctionsfactory.cpp qopenglversionfunctionsfactory.h
|
||||
qopenglversionprofile.cpp qopenglversionprofile.h
|
||||
qopenglvertexarrayobject.cpp qopenglvertexarrayobject.h
|
||||
qopenglwindow.cpp qopenglwindow.h
|
||||
qtopenglglobal.h
|
||||
DEFINES
|
||||
@ -40,19 +48,39 @@ qt_add_module(OpenGL
|
||||
## Scopes:
|
||||
#####################################################################
|
||||
|
||||
qt_extend_target(OpenGL CONDITION QT_FEATURE_widgets
|
||||
qt_extend_target(OpenGL CONDITION QT_FEATURE_opengles2
|
||||
SOURCES
|
||||
qopenglwidget.cpp qopenglwidget.h
|
||||
LIBRARIES
|
||||
Qt::WidgetsPrivate
|
||||
PUBLIC_LIBRARIES
|
||||
Qt::Widgets
|
||||
PRIVATE_MODULE_INTERFACE
|
||||
Qt::WidgetsPrivate
|
||||
opengl/qopenglfunctions_es2.cpp opengl/qopenglfunctions_es2.h
|
||||
)
|
||||
|
||||
qt_extend_target(OpenGL CONDITION NOT QT_FEATURE_opengles2
|
||||
SOURCES
|
||||
qopenglfunctions_1_0.cpp qopenglfunctions_1_0.h
|
||||
qopenglfunctions_1_1.cpp qopenglfunctions_1_1.h
|
||||
qopenglfunctions_1_2.cpp qopenglfunctions_1_2.h
|
||||
qopenglfunctions_1_3.cpp qopenglfunctions_1_3.h
|
||||
qopenglfunctions_1_4.cpp qopenglfunctions_1_4.h
|
||||
qopenglfunctions_1_5.cpp qopenglfunctions_1_5.h
|
||||
qopenglfunctions_2_0.cpp qopenglfunctions_2_0.h
|
||||
qopenglfunctions_2_1.cpp qopenglfunctions_2_1.h
|
||||
qopenglfunctions_3_0.cpp qopenglfunctions_3_0.h
|
||||
qopenglfunctions_3_1.cpp qopenglfunctions_3_1.h
|
||||
qopenglfunctions_3_2_compatibility.cpp qopenglfunctions_3_2_compatibility.h
|
||||
qopenglfunctions_3_2_core.cpp qopenglfunctions_3_2_core.h
|
||||
qopenglfunctions_3_3_compatibility.cpp qopenglfunctions_3_3_compatibility.h
|
||||
qopenglfunctions_3_3_core.cpp qopenglfunctions_3_3_core.h
|
||||
qopenglfunctions_4_0_compatibility.cpp qopenglfunctions_4_0_compatibility.h
|
||||
qopenglfunctions_4_0_core.cpp qopenglfunctions_4_0_core.h
|
||||
qopenglfunctions_4_1_compatibility.cpp qopenglfunctions_4_1_compatibility.h
|
||||
qopenglfunctions_4_1_core.cpp qopenglfunctions_4_1_core.h
|
||||
qopenglfunctions_4_2_compatibility.cpp qopenglfunctions_4_2_compatibility.h
|
||||
qopenglfunctions_4_2_core.cpp qopenglfunctions_4_2_core.h
|
||||
qopenglfunctions_4_3_compatibility.cpp qopenglfunctions_4_3_compatibility.h
|
||||
qopenglfunctions_4_3_core.cpp qopenglfunctions_4_3_core.h
|
||||
qopenglfunctions_4_4_compatibility.cpp qopenglfunctions_4_4_compatibility.h
|
||||
qopenglfunctions_4_4_core.cpp qopenglfunctions_4_4_core.h
|
||||
qopenglfunctions_4_5_compatibility.cpp qopenglfunctions_4_5_compatibility.h
|
||||
qopenglfunctions_4_5_core.cpp qopenglfunctions_4_5_core.h
|
||||
qopenglqueryhelper_p.h
|
||||
qopengltimerquery.cpp qopengltimerquery.h
|
||||
)
|
||||
|
@ -25,6 +25,9 @@ qt_add_module(OpenGL
|
||||
qopengltextureglyphcache.cpp qopengltextureglyphcache_p.h
|
||||
qopengltexturehelper.cpp qopengltexturehelper_p.h
|
||||
qopengltextureuploader.cpp qopengltextureuploader_p.h
|
||||
qopenglversionfunctions.cpp qopenglversionfunctions.h qopenglversionfunctions_p.h
|
||||
qopenglversionfunctionsfactory.cpp qopenglversionfunctionsfactory.h
|
||||
qopenglversionprofile.cpp qopenglversionprofile.h
|
||||
qopenglvertexarrayobject.cpp qopenglvertexarrayobject.h
|
||||
qopenglwindow.cpp qopenglwindow.h
|
||||
qtopenglglobal.h
|
||||
@ -45,8 +48,39 @@ qt_add_module(OpenGL
|
||||
## Scopes:
|
||||
#####################################################################
|
||||
|
||||
qt_extend_target(OpenGL CONDITION QT_FEATURE_opengles2
|
||||
SOURCES
|
||||
qopenglfunctions_es2.cpp qopenglfunctions_es2.h
|
||||
)
|
||||
|
||||
qt_extend_target(OpenGL CONDITION NOT QT_FEATURE_opengles2
|
||||
SOURCES
|
||||
qopenglfunctions_1_0.cpp qopenglfunctions_1_0.h
|
||||
qopenglfunctions_1_1.cpp qopenglfunctions_1_1.h
|
||||
qopenglfunctions_1_2.cpp qopenglfunctions_1_2.h
|
||||
qopenglfunctions_1_3.cpp qopenglfunctions_1_3.h
|
||||
qopenglfunctions_1_4.cpp qopenglfunctions_1_4.h
|
||||
qopenglfunctions_1_5.cpp qopenglfunctions_1_5.h
|
||||
qopenglfunctions_2_0.cpp qopenglfunctions_2_0.h
|
||||
qopenglfunctions_2_1.cpp qopenglfunctions_2_1.h
|
||||
qopenglfunctions_3_0.cpp qopenglfunctions_3_0.h
|
||||
qopenglfunctions_3_1.cpp qopenglfunctions_3_1.h
|
||||
qopenglfunctions_3_2_compatibility.cpp qopenglfunctions_3_2_compatibility.h
|
||||
qopenglfunctions_3_2_core.cpp qopenglfunctions_3_2_core.h
|
||||
qopenglfunctions_3_3_compatibility.cpp qopenglfunctions_3_3_compatibility.h
|
||||
qopenglfunctions_3_3_core.cpp qopenglfunctions_3_3_core.h
|
||||
qopenglfunctions_4_0_compatibility.cpp qopenglfunctions_4_0_compatibility.h
|
||||
qopenglfunctions_4_0_core.cpp qopenglfunctions_4_0_core.h
|
||||
qopenglfunctions_4_1_compatibility.cpp qopenglfunctions_4_1_compatibility.h
|
||||
qopenglfunctions_4_1_core.cpp qopenglfunctions_4_1_core.h
|
||||
qopenglfunctions_4_2_compatibility.cpp qopenglfunctions_4_2_compatibility.h
|
||||
qopenglfunctions_4_2_core.cpp qopenglfunctions_4_2_core.h
|
||||
qopenglfunctions_4_3_compatibility.cpp qopenglfunctions_4_3_compatibility.h
|
||||
qopenglfunctions_4_3_core.cpp qopenglfunctions_4_3_core.h
|
||||
qopenglfunctions_4_4_compatibility.cpp qopenglfunctions_4_4_compatibility.h
|
||||
qopenglfunctions_4_4_core.cpp qopenglfunctions_4_4_core.h
|
||||
qopenglfunctions_4_5_compatibility.cpp qopenglfunctions_4_5_compatibility.h
|
||||
qopenglfunctions_4_5_core.cpp qopenglfunctions_4_5_core.h
|
||||
qopenglqueryhelper_p.h
|
||||
qopengltimerquery.cpp qopengltimerquery.h
|
||||
)
|
||||
|
59
src/opengl/doc/src/dontdocument.qdoc
Normal file
59
src/opengl/doc/src/dontdocument.qdoc
Normal file
@ -0,0 +1,59 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2019 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the documentation of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:FDL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Free Documentation License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Free
|
||||
** Documentation License version 1.3 as published by the Free Software
|
||||
** Foundation and appearing in the file included in the packaging of
|
||||
** this file. Please review the following information to ensure
|
||||
** the GNU Free Documentation License version 1.3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
/*!
|
||||
\dontdocument (QOpenGLVersionStatus
|
||||
QOpenGLVersionFunctionsBackend
|
||||
QOpenGLVersionFunctionsStorage
|
||||
QOpenGLFunctions_1_0_CoreBackend
|
||||
QOpenGLFunctions_1_1_CoreBackend
|
||||
QOpenGLFunctions_1_2_CoreBackend
|
||||
QOpenGLFunctions_1_3_CoreBackend
|
||||
QOpenGLFunctions_1_4_CoreBackend
|
||||
QOpenGLFunctions_1_5_CoreBackend
|
||||
QOpenGLFunctions_2_0_CoreBackend
|
||||
QOpenGLFunctions_2_1_CoreBackend
|
||||
QOpenGLFunctions_3_0_CoreBackend
|
||||
QOpenGLFunctions_3_1_CoreBackend
|
||||
QOpenGLFunctions_3_2_CoreBackend
|
||||
QOpenGLFunctions_3_3_CoreBackend
|
||||
QOpenGLFunctions_4_0_CoreBackend
|
||||
QOpenGLFunctions_4_1_CoreBackend
|
||||
QOpenGLFunctions_4_2_CoreBackend
|
||||
QOpenGLFunctions_4_3_CoreBackend
|
||||
QOpenGLFunctions_4_4_CoreBackend
|
||||
QOpenGLFunctions_4_5_CoreBackend
|
||||
QOpenGLFunctions_1_0_DeprecatedBackend
|
||||
QOpenGLFunctions_1_1_DeprecatedBackend
|
||||
QOpenGLFunctions_1_2_DeprecatedBackend
|
||||
QOpenGLFunctions_1_3_DeprecatedBackend
|
||||
QOpenGLFunctions_1_4_DeprecatedBackend
|
||||
QOpenGLFunctions_2_0_DeprecatedBackend
|
||||
QOpenGLFunctions_3_0_DeprecatedBackend
|
||||
QOpenGLFunctions_3_3_DeprecatedBackend
|
||||
QOpenGLFunctions_4_5_DeprecatedBackend)
|
||||
*/
|
@ -31,6 +31,10 @@ HEADERS += \
|
||||
qopengltexturecache_p.h \
|
||||
qopengltextureglyphcache_p.h \
|
||||
qopengltextureuploader_p.h \
|
||||
qopenglversionfunctions.h \
|
||||
qopenglversionfunctions_p.h \
|
||||
qopenglversionfunctionsfactory.h \
|
||||
qopenglversionprofile.h \
|
||||
qopenglvertexarrayobject.h \
|
||||
qopenglwindow.h \
|
||||
qtopenglglobal.h
|
||||
@ -52,16 +56,77 @@ SOURCES += \
|
||||
qopengltexturecache.cpp \
|
||||
qopengltextureglyphcache.cpp \
|
||||
qopengltextureuploader.cpp \
|
||||
qopenglversionfunctions.cpp \
|
||||
qopenglversionfunctionsfactory.cpp \
|
||||
qopenglversionprofile.cpp \
|
||||
qopenglvertexarrayobject.cpp \
|
||||
qopenglwindow.cpp \
|
||||
qopengldebug.cpp
|
||||
|
||||
!qtConfig(opengles2) {
|
||||
HEADERS += \
|
||||
qopenglfunctions_1_0.h \
|
||||
qopenglfunctions_1_1.h \
|
||||
qopenglfunctions_1_2.h \
|
||||
qopenglfunctions_1_3.h \
|
||||
qopenglfunctions_1_4.h \
|
||||
qopenglfunctions_1_5.h \
|
||||
qopenglfunctions_2_0.h \
|
||||
qopenglfunctions_2_1.h \
|
||||
qopenglfunctions_3_0.h \
|
||||
qopenglfunctions_3_1.h \
|
||||
qopenglfunctions_3_2_core.h \
|
||||
qopenglfunctions_3_3_core.h \
|
||||
qopenglfunctions_4_0_core.h \
|
||||
qopenglfunctions_4_1_core.h \
|
||||
qopenglfunctions_4_2_core.h \
|
||||
qopenglfunctions_4_3_core.h \
|
||||
qopenglfunctions_4_4_core.h \
|
||||
qopenglfunctions_4_5_core.h \
|
||||
qopenglfunctions_3_2_compatibility.h \
|
||||
qopenglfunctions_3_3_compatibility.h \
|
||||
qopenglfunctions_4_0_compatibility.h \
|
||||
qopenglfunctions_4_1_compatibility.h \
|
||||
qopenglfunctions_4_2_compatibility.h \
|
||||
qopenglfunctions_4_3_compatibility.h \
|
||||
qopenglfunctions_4_4_compatibility.h \
|
||||
qopenglfunctions_4_5_compatibility.h \
|
||||
qopenglqueryhelper_p.h \
|
||||
qopengltimerquery.h
|
||||
|
||||
SOURCES += qopengltimerquery.cpp
|
||||
SOURCES += \
|
||||
qopenglfunctions_1_0.cpp \
|
||||
qopenglfunctions_1_1.cpp \
|
||||
qopenglfunctions_1_2.cpp \
|
||||
qopenglfunctions_1_3.cpp \
|
||||
qopenglfunctions_1_4.cpp \
|
||||
qopenglfunctions_1_5.cpp \
|
||||
qopenglfunctions_2_0.cpp \
|
||||
qopenglfunctions_2_1.cpp \
|
||||
qopenglfunctions_3_0.cpp \
|
||||
qopenglfunctions_3_1.cpp \
|
||||
qopenglfunctions_3_2_core.cpp \
|
||||
qopenglfunctions_3_3_core.cpp \
|
||||
qopenglfunctions_4_0_core.cpp \
|
||||
qopenglfunctions_4_1_core.cpp \
|
||||
qopenglfunctions_4_2_core.cpp \
|
||||
qopenglfunctions_4_3_core.cpp \
|
||||
qopenglfunctions_4_4_core.cpp \
|
||||
qopenglfunctions_4_5_core.cpp \
|
||||
qopenglfunctions_3_2_compatibility.cpp \
|
||||
qopenglfunctions_3_3_compatibility.cpp \
|
||||
qopenglfunctions_4_0_compatibility.cpp \
|
||||
qopenglfunctions_4_1_compatibility.cpp \
|
||||
qopenglfunctions_4_2_compatibility.cpp \
|
||||
qopenglfunctions_4_3_compatibility.cpp \
|
||||
qopenglfunctions_4_4_compatibility.cpp \
|
||||
qopenglfunctions_4_5_compatibility.cpp \
|
||||
qopengltimerquery.cpp
|
||||
}
|
||||
|
||||
qtConfig(opengles2) {
|
||||
HEADERS += qopenglfunctions_es2.h
|
||||
SOURCES += qopenglfunctions_es2.cpp
|
||||
}
|
||||
|
||||
load(qt_module)
|
||||
|
@ -3,7 +3,7 @@
|
||||
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
/*!
|
||||
\class QOpenGLFunctions_1_0
|
||||
\inmodule QtGui
|
||||
\inmodule QtOpenGL
|
||||
\since 5.1
|
||||
\wrapper
|
||||
\brief The QOpenGLFunctions_1_0 class provides all functions for OpenGL 1.0 specification.
|
@ -4,7 +4,7 @@
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -50,16 +50,17 @@
|
||||
#ifndef QOPENGLVERSIONFUNCTIONS_1_0_H
|
||||
#define QOPENGLVERSIONFUNCTIONS_1_0_H
|
||||
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
#include <QtOpenGL/qtopenglglobal.h>
|
||||
|
||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
||||
|
||||
#include <QtGui/QOpenGLVersionFunctions>
|
||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||
#include <QtGui/qopenglcontext.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Q_GUI_EXPORT QOpenGLFunctions_1_0 : public QAbstractOpenGLFunctions
|
||||
class Q_OPENGL_EXPORT QOpenGLFunctions_1_0 : public QAbstractOpenGLFunctions
|
||||
{
|
||||
public:
|
||||
QOpenGLFunctions_1_0();
|
||||
@ -378,7 +379,7 @@ public:
|
||||
void glNewList(GLuint list, GLenum mode);
|
||||
|
||||
private:
|
||||
friend class QOpenGLContext;
|
||||
friend class QOpenGLVersionFunctionsFactory;
|
||||
|
||||
static bool isContextCompatible(QOpenGLContext *context);
|
||||
static QOpenGLVersionProfile versionProfile();
|
@ -3,7 +3,7 @@
|
||||
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
/*!
|
||||
\class QOpenGLFunctions_1_1
|
||||
\inmodule QtGui
|
||||
\inmodule QtOpenGL
|
||||
\since 5.1
|
||||
\wrapper
|
||||
\brief The QOpenGLFunctions_1_1 class provides all functions for OpenGL 1.1 specification.
|
@ -4,7 +4,7 @@
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -50,16 +50,17 @@
|
||||
#ifndef QOPENGLVERSIONFUNCTIONS_1_1_H
|
||||
#define QOPENGLVERSIONFUNCTIONS_1_1_H
|
||||
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
#include <QtOpenGL/qtopenglglobal.h>
|
||||
|
||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
||||
|
||||
#include <QtGui/QOpenGLVersionFunctions>
|
||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||
#include <QtGui/qopenglcontext.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Q_GUI_EXPORT QOpenGLFunctions_1_1 : public QAbstractOpenGLFunctions
|
||||
class Q_OPENGL_EXPORT QOpenGLFunctions_1_1 : public QAbstractOpenGLFunctions
|
||||
{
|
||||
public:
|
||||
QOpenGLFunctions_1_1();
|
||||
@ -412,7 +413,7 @@ public:
|
||||
void glArrayElement(GLint i);
|
||||
|
||||
private:
|
||||
friend class QOpenGLContext;
|
||||
friend class QOpenGLVersionFunctionsFactory;
|
||||
|
||||
static bool isContextCompatible(QOpenGLContext *context);
|
||||
static QOpenGLVersionProfile versionProfile();
|
@ -3,7 +3,7 @@
|
||||
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
/*!
|
||||
\class QOpenGLFunctions_1_2
|
||||
\inmodule QtGui
|
||||
\inmodule QtOpenGL
|
||||
\since 5.1
|
||||
\wrapper
|
||||
\brief The QOpenGLFunctions_1_2 class provides all functions for OpenGL 1.2 specification.
|
@ -4,7 +4,7 @@
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -50,16 +50,18 @@
|
||||
#ifndef QOPENGLVERSIONFUNCTIONS_1_2_H
|
||||
#define QOPENGLVERSIONFUNCTIONS_1_2_H
|
||||
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
#include <QtOpenGL/qtopenglglobal.h>
|
||||
|
||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
||||
|
||||
#include <QtGui/QOpenGLVersionFunctions>
|
||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||
#include <QtGui/qopenglcontext.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Q_GUI_EXPORT QOpenGLFunctions_1_2 : public QAbstractOpenGLFunctions
|
||||
class Q_OPENGL_EXPORT QOpenGLFunctions_1_2 : public QAbstractOpenGLFunctions
|
||||
{
|
||||
public:
|
||||
QOpenGLFunctions_1_2();
|
||||
@ -454,7 +456,7 @@ public:
|
||||
void glColorTable(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
|
||||
|
||||
private:
|
||||
friend class QOpenGLContext;
|
||||
friend class QOpenGLVersionFunctionsFactory;
|
||||
|
||||
static bool isContextCompatible(QOpenGLContext *context);
|
||||
static QOpenGLVersionProfile versionProfile();
|
@ -3,7 +3,7 @@
|
||||
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
/*!
|
||||
\class QOpenGLFunctions_1_3
|
||||
\inmodule QtGui
|
||||
\inmodule QtOpenGL
|
||||
\since 5.1
|
||||
\wrapper
|
||||
\brief The QOpenGLFunctions_1_3 class provides all functions for OpenGL 1.3 specification.
|
@ -4,7 +4,7 @@
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -50,16 +50,17 @@
|
||||
#ifndef QOPENGLVERSIONFUNCTIONS_1_3_H
|
||||
#define QOPENGLVERSIONFUNCTIONS_1_3_H
|
||||
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
#include <QtOpenGL/qtopenglglobal.h>
|
||||
|
||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
||||
|
||||
#include <QtGui/QOpenGLVersionFunctions>
|
||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||
#include <QtGui/qopenglcontext.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Q_GUI_EXPORT QOpenGLFunctions_1_3 : public QAbstractOpenGLFunctions
|
||||
class Q_OPENGL_EXPORT QOpenGLFunctions_1_3 : public QAbstractOpenGLFunctions
|
||||
{
|
||||
public:
|
||||
QOpenGLFunctions_1_3();
|
||||
@ -504,7 +505,7 @@ public:
|
||||
void glClientActiveTexture(GLenum texture);
|
||||
|
||||
private:
|
||||
friend class QOpenGLContext;
|
||||
friend class QOpenGLVersionFunctionsFactory;
|
||||
|
||||
static bool isContextCompatible(QOpenGLContext *context);
|
||||
static QOpenGLVersionProfile versionProfile();
|
@ -3,7 +3,7 @@
|
||||
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
/*!
|
||||
\class QOpenGLFunctions_1_4
|
||||
\inmodule QtGui
|
||||
\inmodule QtOpenGL
|
||||
\since 5.1
|
||||
\wrapper
|
||||
\brief The QOpenGLFunctions_1_4 class provides all functions for OpenGL 1.4 specification.
|
@ -4,7 +4,7 @@
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -50,16 +50,17 @@
|
||||
#ifndef QOPENGLVERSIONFUNCTIONS_1_4_H
|
||||
#define QOPENGLVERSIONFUNCTIONS_1_4_H
|
||||
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
#include <QtOpenGL/qtopenglglobal.h>
|
||||
|
||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
||||
|
||||
#include <QtGui/QOpenGLVersionFunctions>
|
||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||
#include <QtGui/qopenglcontext.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Q_GUI_EXPORT QOpenGLFunctions_1_4 : public QAbstractOpenGLFunctions
|
||||
class Q_OPENGL_EXPORT QOpenGLFunctions_1_4 : public QAbstractOpenGLFunctions
|
||||
{
|
||||
public:
|
||||
QOpenGLFunctions_1_4();
|
||||
@ -553,7 +554,7 @@ public:
|
||||
void glFogCoordf(GLfloat coord);
|
||||
|
||||
private:
|
||||
friend class QOpenGLContext;
|
||||
friend class QOpenGLVersionFunctionsFactory;
|
||||
|
||||
static bool isContextCompatible(QOpenGLContext *context);
|
||||
static QOpenGLVersionProfile versionProfile();
|
@ -3,7 +3,7 @@
|
||||
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
/*!
|
||||
\class QOpenGLFunctions_1_5
|
||||
\inmodule QtGui
|
||||
\inmodule QtOpenGL
|
||||
\since 5.1
|
||||
\wrapper
|
||||
\brief The QOpenGLFunctions_1_5 class provides all functions for OpenGL 1.5 specification.
|
@ -4,7 +4,7 @@
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -50,16 +50,17 @@
|
||||
#ifndef QOPENGLVERSIONFUNCTIONS_1_5_H
|
||||
#define QOPENGLVERSIONFUNCTIONS_1_5_H
|
||||
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
#include <QtOpenGL/qtopenglglobal.h>
|
||||
|
||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
||||
|
||||
#include <QtGui/QOpenGLVersionFunctions>
|
||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||
#include <QtGui/qopenglcontext.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Q_GUI_EXPORT QOpenGLFunctions_1_5 : public QAbstractOpenGLFunctions
|
||||
class Q_OPENGL_EXPORT QOpenGLFunctions_1_5 : public QAbstractOpenGLFunctions
|
||||
{
|
||||
public:
|
||||
QOpenGLFunctions_1_5();
|
||||
@ -576,7 +577,7 @@ public:
|
||||
// OpenGL 1.5 deprecated functions
|
||||
|
||||
private:
|
||||
friend class QOpenGLContext;
|
||||
friend class QOpenGLVersionFunctionsFactory;
|
||||
|
||||
static bool isContextCompatible(QOpenGLContext *context);
|
||||
static QOpenGLVersionProfile versionProfile();
|
@ -3,7 +3,7 @@
|
||||
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
/*!
|
||||
\class QOpenGLFunctions_2_0
|
||||
\inmodule QtGui
|
||||
\inmodule QtOpenGL
|
||||
\since 5.1
|
||||
\wrapper
|
||||
\brief The QOpenGLFunctions_2_0 class provides all functions for OpenGL 2.0 specification.
|
@ -4,7 +4,7 @@
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -50,16 +50,17 @@
|
||||
#ifndef QOPENGLVERSIONFUNCTIONS_2_0_H
|
||||
#define QOPENGLVERSIONFUNCTIONS_2_0_H
|
||||
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
#include <QtOpenGL/qtopenglglobal.h>
|
||||
|
||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
||||
|
||||
#include <QtGui/QOpenGLVersionFunctions>
|
||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||
#include <QtGui/qopenglcontext.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Q_GUI_EXPORT QOpenGLFunctions_2_0 : public QAbstractOpenGLFunctions
|
||||
class Q_OPENGL_EXPORT QOpenGLFunctions_2_0 : public QAbstractOpenGLFunctions
|
||||
{
|
||||
public:
|
||||
QOpenGLFunctions_2_0();
|
||||
@ -673,7 +674,7 @@ public:
|
||||
void glVertexAttrib1d(GLuint index, GLdouble x);
|
||||
|
||||
private:
|
||||
friend class QOpenGLContext;
|
||||
friend class QOpenGLVersionFunctionsFactory;
|
||||
|
||||
static bool isContextCompatible(QOpenGLContext *context);
|
||||
static QOpenGLVersionProfile versionProfile();
|
@ -3,7 +3,7 @@
|
||||
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
/*!
|
||||
\class QOpenGLFunctions_2_1
|
||||
\inmodule QtGui
|
||||
\inmodule QtOpenGL
|
||||
\since 5.1
|
||||
\wrapper
|
||||
\brief The QOpenGLFunctions_2_1 class provides all functions for OpenGL 2.1 specification.
|
@ -4,7 +4,7 @@
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -50,16 +50,17 @@
|
||||
#ifndef QOPENGLVERSIONFUNCTIONS_2_1_H
|
||||
#define QOPENGLVERSIONFUNCTIONS_2_1_H
|
||||
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
#include <QtOpenGL/qtopenglglobal.h>
|
||||
|
||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
||||
|
||||
#include <QtGui/QOpenGLVersionFunctions>
|
||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||
#include <QtGui/qopenglcontext.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Q_GUI_EXPORT QOpenGLFunctions_2_1 : public QAbstractOpenGLFunctions
|
||||
class Q_OPENGL_EXPORT QOpenGLFunctions_2_1 : public QAbstractOpenGLFunctions
|
||||
{
|
||||
public:
|
||||
QOpenGLFunctions_2_1();
|
||||
@ -683,7 +684,7 @@ public:
|
||||
// OpenGL 2.1 deprecated functions
|
||||
|
||||
private:
|
||||
friend class QOpenGLContext;
|
||||
friend class QOpenGLVersionFunctionsFactory;
|
||||
|
||||
static bool isContextCompatible(QOpenGLContext *context);
|
||||
static QOpenGLVersionProfile versionProfile();
|
@ -3,7 +3,7 @@
|
||||
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
/*!
|
||||
\class QOpenGLFunctions_3_0
|
||||
\inmodule QtGui
|
||||
\inmodule QtOpenGL
|
||||
\since 5.1
|
||||
\wrapper
|
||||
\brief The QOpenGLFunctions_3_0 class provides all functions for OpenGL 3.0 specification.
|
@ -4,7 +4,7 @@
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -50,16 +50,17 @@
|
||||
#ifndef QOPENGLVERSIONFUNCTIONS_3_0_H
|
||||
#define QOPENGLVERSIONFUNCTIONS_3_0_H
|
||||
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
#include <QtOpenGL/qtopenglglobal.h>
|
||||
|
||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
||||
|
||||
#include <QtGui/QOpenGLVersionFunctions>
|
||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||
#include <QtGui/qopenglcontext.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Q_GUI_EXPORT QOpenGLFunctions_3_0 : public QAbstractOpenGLFunctions
|
||||
class Q_OPENGL_EXPORT QOpenGLFunctions_3_0 : public QAbstractOpenGLFunctions
|
||||
{
|
||||
public:
|
||||
QOpenGLFunctions_3_0();
|
||||
@ -771,7 +772,7 @@ public:
|
||||
void glVertexAttribI1i(GLuint index, GLint x);
|
||||
|
||||
private:
|
||||
friend class QOpenGLContext;
|
||||
friend class QOpenGLVersionFunctionsFactory;
|
||||
|
||||
static bool isContextCompatible(QOpenGLContext *context);
|
||||
static QOpenGLVersionProfile versionProfile();
|
@ -3,7 +3,7 @@
|
||||
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
/*!
|
||||
\class QOpenGLFunctions_3_1
|
||||
\inmodule QtGui
|
||||
\inmodule QtOpenGL
|
||||
\since 5.1
|
||||
\wrapper
|
||||
\brief The QOpenGLFunctions_3_1 class provides all functions for OpenGL 3.1 specification.
|
@ -4,7 +4,7 @@
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -50,16 +50,17 @@
|
||||
#ifndef QOPENGLVERSIONFUNCTIONS_3_1_H
|
||||
#define QOPENGLVERSIONFUNCTIONS_3_1_H
|
||||
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
#include <QtOpenGL/qtopenglglobal.h>
|
||||
|
||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
||||
|
||||
#include <QtGui/QOpenGLVersionFunctions>
|
||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||
#include <QtGui/qopenglcontext.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Q_GUI_EXPORT QOpenGLFunctions_3_1 : public QAbstractOpenGLFunctions
|
||||
class Q_OPENGL_EXPORT QOpenGLFunctions_3_1 : public QAbstractOpenGLFunctions
|
||||
{
|
||||
public:
|
||||
QOpenGLFunctions_3_1();
|
||||
@ -332,7 +333,7 @@ public:
|
||||
void glDrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instancecount);
|
||||
|
||||
private:
|
||||
friend class QOpenGLContext;
|
||||
friend class QOpenGLVersionFunctionsFactory;
|
||||
|
||||
static bool isContextCompatible(QOpenGLContext *context);
|
||||
static QOpenGLVersionProfile versionProfile();
|
@ -3,7 +3,7 @@
|
||||
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
/*!
|
||||
\class QOpenGLFunctions_3_2_Compatibility
|
||||
\inmodule QtGui
|
||||
\inmodule QtOpenGL
|
||||
\since 5.1
|
||||
\wrapper
|
||||
\brief The QOpenGLFunctions_3_2_Compatibility class provides all functions for OpenGL 3.2 compatibility profile.
|
@ -4,7 +4,7 @@
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -50,16 +50,17 @@
|
||||
#ifndef QOPENGLVERSIONFUNCTIONS_3_2_COMPATIBILITY_H
|
||||
#define QOPENGLVERSIONFUNCTIONS_3_2_COMPATIBILITY_H
|
||||
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
#include <QtOpenGL/qtopenglglobal.h>
|
||||
|
||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
||||
|
||||
#include <QtGui/QOpenGLVersionFunctions>
|
||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||
#include <QtGui/qopenglcontext.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Q_GUI_EXPORT QOpenGLFunctions_3_2_Compatibility : public QAbstractOpenGLFunctions
|
||||
class Q_OPENGL_EXPORT QOpenGLFunctions_3_2_Compatibility : public QAbstractOpenGLFunctions
|
||||
{
|
||||
public:
|
||||
QOpenGLFunctions_3_2_Compatibility();
|
||||
@ -810,7 +811,7 @@ public:
|
||||
// OpenGL 3.2 deprecated functions
|
||||
|
||||
private:
|
||||
friend class QOpenGLContext;
|
||||
friend class QOpenGLVersionFunctionsFactory;
|
||||
|
||||
static bool isContextCompatible(QOpenGLContext *context);
|
||||
static QOpenGLVersionProfile versionProfile();
|
@ -3,7 +3,7 @@
|
||||
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
/*!
|
||||
\class QOpenGLFunctions_3_2_Core
|
||||
\inmodule QtGui
|
||||
\inmodule QtOpenGL
|
||||
\since 5.1
|
||||
\wrapper
|
||||
\brief The QOpenGLFunctions_3_2_Core class provides all functions for OpenGL 3.2 core profile.
|
@ -4,7 +4,7 @@
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -50,16 +50,17 @@
|
||||
#ifndef QOPENGLVERSIONFUNCTIONS_3_2_CORE_H
|
||||
#define QOPENGLVERSIONFUNCTIONS_3_2_CORE_H
|
||||
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
#include <QtOpenGL/qtopenglglobal.h>
|
||||
|
||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
||||
|
||||
#include <QtGui/QOpenGLVersionFunctions>
|
||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||
#include <QtGui/qopenglcontext.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Q_GUI_EXPORT QOpenGLFunctions_3_2_Core : public QAbstractOpenGLFunctions
|
||||
class Q_OPENGL_EXPORT QOpenGLFunctions_3_2_Core : public QAbstractOpenGLFunctions
|
||||
{
|
||||
public:
|
||||
QOpenGLFunctions_3_2_Core();
|
||||
@ -353,7 +354,7 @@ public:
|
||||
void glGetInteger64i_v(GLenum target, GLuint index, GLint64 *data);
|
||||
|
||||
private:
|
||||
friend class QOpenGLContext;
|
||||
friend class QOpenGLVersionFunctionsFactory;
|
||||
|
||||
static bool isContextCompatible(QOpenGLContext *context);
|
||||
static QOpenGLVersionProfile versionProfile();
|
@ -3,7 +3,7 @@
|
||||
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
/*!
|
||||
\class QOpenGLFunctions_3_3_Compatibility
|
||||
\inmodule QtGui
|
||||
\inmodule QtOpenGL
|
||||
\since 5.1
|
||||
\wrapper
|
||||
\brief The QOpenGLFunctions_3_3_Compatibility class provides all functions for OpenGL 3.3 compatibility profile.
|
@ -4,7 +4,7 @@
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -50,16 +50,17 @@
|
||||
#ifndef QOPENGLVERSIONFUNCTIONS_3_3_COMPATIBILITY_H
|
||||
#define QOPENGLVERSIONFUNCTIONS_3_3_COMPATIBILITY_H
|
||||
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
#include <QtOpenGL/qtopenglglobal.h>
|
||||
|
||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
||||
|
||||
#include <QtGui/QOpenGLVersionFunctions>
|
||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||
#include <QtGui/qopenglcontext.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Q_GUI_EXPORT QOpenGLFunctions_3_3_Compatibility : public QAbstractOpenGLFunctions
|
||||
class Q_OPENGL_EXPORT QOpenGLFunctions_3_3_Compatibility : public QAbstractOpenGLFunctions
|
||||
{
|
||||
public:
|
||||
QOpenGLFunctions_3_3_Compatibility();
|
||||
@ -872,7 +873,7 @@ public:
|
||||
// OpenGL 3.3 deprecated functions
|
||||
|
||||
private:
|
||||
friend class QOpenGLContext;
|
||||
friend class QOpenGLVersionFunctionsFactory;
|
||||
|
||||
static bool isContextCompatible(QOpenGLContext *context);
|
||||
static QOpenGLVersionProfile versionProfile();
|
@ -3,7 +3,7 @@
|
||||
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
/*!
|
||||
\class QOpenGLFunctions_3_3_Core
|
||||
\inmodule QtGui
|
||||
\inmodule QtOpenGL
|
||||
\since 5.1
|
||||
\wrapper
|
||||
\brief The QOpenGLFunctions_3_3_Core class provides all functions for OpenGL 3.3 core profile.
|
@ -4,7 +4,7 @@
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -50,16 +50,17 @@
|
||||
#ifndef QOPENGLVERSIONFUNCTIONS_3_3_CORE_H
|
||||
#define QOPENGLVERSIONFUNCTIONS_3_3_CORE_H
|
||||
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
#include <QtOpenGL/qtopenglglobal.h>
|
||||
|
||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
||||
|
||||
#include <QtGui/QOpenGLVersionFunctions>
|
||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||
#include <QtGui/qopenglcontext.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Q_GUI_EXPORT QOpenGLFunctions_3_3_Core : public QAbstractOpenGLFunctions
|
||||
class Q_OPENGL_EXPORT QOpenGLFunctions_3_3_Core : public QAbstractOpenGLFunctions
|
||||
{
|
||||
public:
|
||||
QOpenGLFunctions_3_3_Core();
|
||||
@ -413,7 +414,7 @@ public:
|
||||
void glVertexAttribDivisor(GLuint index, GLuint divisor);
|
||||
|
||||
private:
|
||||
friend class QOpenGLContext;
|
||||
friend class QOpenGLVersionFunctionsFactory;
|
||||
|
||||
static bool isContextCompatible(QOpenGLContext *context);
|
||||
static QOpenGLVersionProfile versionProfile();
|
@ -3,7 +3,7 @@
|
||||
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
/*!
|
||||
\class QOpenGLFunctions_4_0_Compatibility
|
||||
\inmodule QtGui
|
||||
\inmodule QtOpenGL
|
||||
\since 5.1
|
||||
\wrapper
|
||||
\brief The QOpenGLFunctions_4_0_Compatibility class provides all functions for OpenGL 4.0 compatibility profile.
|
@ -4,7 +4,7 @@
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -50,16 +50,17 @@
|
||||
#ifndef QOPENGLVERSIONFUNCTIONS_4_0_COMPATIBILITY_H
|
||||
#define QOPENGLVERSIONFUNCTIONS_4_0_COMPATIBILITY_H
|
||||
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
#include <QtOpenGL/qtopenglglobal.h>
|
||||
|
||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
||||
|
||||
#include <QtGui/QOpenGLVersionFunctions>
|
||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||
#include <QtGui/qopenglcontext.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Q_GUI_EXPORT QOpenGLFunctions_4_0_Compatibility : public QAbstractOpenGLFunctions
|
||||
class Q_OPENGL_EXPORT QOpenGLFunctions_4_0_Compatibility : public QAbstractOpenGLFunctions
|
||||
{
|
||||
public:
|
||||
QOpenGLFunctions_4_0_Compatibility();
|
||||
@ -922,7 +923,7 @@ public:
|
||||
// OpenGL 4.0 deprecated functions
|
||||
|
||||
private:
|
||||
friend class QOpenGLContext;
|
||||
friend class QOpenGLVersionFunctionsFactory;
|
||||
|
||||
static bool isContextCompatible(QOpenGLContext *context);
|
||||
static QOpenGLVersionProfile versionProfile();
|
@ -3,7 +3,7 @@
|
||||
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
/*!
|
||||
\class QOpenGLFunctions_4_0_Core
|
||||
\inmodule QtGui
|
||||
\inmodule QtOpenGL
|
||||
\since 5.1
|
||||
\wrapper
|
||||
\brief The QOpenGLFunctions_4_0_Core class provides all functions for OpenGL 4.0 core profile.
|
@ -4,7 +4,7 @@
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -50,16 +50,17 @@
|
||||
#ifndef QOPENGLVERSIONFUNCTIONS_4_0_CORE_H
|
||||
#define QOPENGLVERSIONFUNCTIONS_4_0_CORE_H
|
||||
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
#include <QtOpenGL/qtopenglglobal.h>
|
||||
|
||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
||||
|
||||
#include <QtGui/QOpenGLVersionFunctions>
|
||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||
#include <QtGui/qopenglcontext.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Q_GUI_EXPORT QOpenGLFunctions_4_0_Core : public QAbstractOpenGLFunctions
|
||||
class Q_OPENGL_EXPORT QOpenGLFunctions_4_0_Core : public QAbstractOpenGLFunctions
|
||||
{
|
||||
public:
|
||||
QOpenGLFunctions_4_0_Core();
|
||||
@ -461,7 +462,7 @@ public:
|
||||
void glMinSampleShading(GLfloat value);
|
||||
|
||||
private:
|
||||
friend class QOpenGLContext;
|
||||
friend class QOpenGLVersionFunctionsFactory;
|
||||
|
||||
static bool isContextCompatible(QOpenGLContext *context);
|
||||
static QOpenGLVersionProfile versionProfile();
|
@ -3,7 +3,7 @@
|
||||
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
/*!
|
||||
\class QOpenGLFunctions_4_1_Compatibility
|
||||
\inmodule QtGui
|
||||
\inmodule QtOpenGL
|
||||
\since 5.1
|
||||
\wrapper
|
||||
\brief The QOpenGLFunctions_4_1_Compatibility class provides all functions for OpenGL 4.1 compatibility profile.
|
@ -4,7 +4,7 @@
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -50,16 +50,17 @@
|
||||
#ifndef QOPENGLVERSIONFUNCTIONS_4_1_COMPATIBILITY_H
|
||||
#define QOPENGLVERSIONFUNCTIONS_4_1_COMPATIBILITY_H
|
||||
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
#include <QtOpenGL/qtopenglglobal.h>
|
||||
|
||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
||||
|
||||
#include <QtGui/QOpenGLVersionFunctions>
|
||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||
#include <QtGui/qopenglcontext.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Q_GUI_EXPORT QOpenGLFunctions_4_1_Compatibility : public QAbstractOpenGLFunctions
|
||||
class Q_OPENGL_EXPORT QOpenGLFunctions_4_1_Compatibility : public QAbstractOpenGLFunctions
|
||||
{
|
||||
public:
|
||||
QOpenGLFunctions_4_1_Compatibility();
|
||||
@ -1014,7 +1015,7 @@ public:
|
||||
// OpenGL 4.1 deprecated functions
|
||||
|
||||
private:
|
||||
friend class QOpenGLContext;
|
||||
friend class QOpenGLVersionFunctionsFactory;
|
||||
|
||||
static bool isContextCompatible(QOpenGLContext *context);
|
||||
static QOpenGLVersionProfile versionProfile();
|
@ -3,7 +3,7 @@
|
||||
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
/*!
|
||||
\class QOpenGLFunctions_4_1_Core
|
||||
\inmodule QtGui
|
||||
\inmodule QtOpenGL
|
||||
\since 5.1
|
||||
\wrapper
|
||||
\brief The QOpenGLFunctions_4_1_Core class provides all functions for OpenGL 4.1 core profile.
|
@ -4,7 +4,7 @@
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -50,16 +50,17 @@
|
||||
#ifndef QOPENGLVERSIONFUNCTIONS_4_1_CORE_H
|
||||
#define QOPENGLVERSIONFUNCTIONS_4_1_CORE_H
|
||||
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
#include <QtOpenGL/qtopenglglobal.h>
|
||||
|
||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
||||
|
||||
#include <QtGui/QOpenGLVersionFunctions>
|
||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||
#include <QtGui/qopenglcontext.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Q_GUI_EXPORT QOpenGLFunctions_4_1_Core : public QAbstractOpenGLFunctions
|
||||
class Q_OPENGL_EXPORT QOpenGLFunctions_4_1_Core : public QAbstractOpenGLFunctions
|
||||
{
|
||||
public:
|
||||
QOpenGLFunctions_4_1_Core();
|
||||
@ -551,7 +552,7 @@ public:
|
||||
void glReleaseShaderCompiler();
|
||||
|
||||
private:
|
||||
friend class QOpenGLContext;
|
||||
friend class QOpenGLVersionFunctionsFactory;
|
||||
|
||||
static bool isContextCompatible(QOpenGLContext *context);
|
||||
static QOpenGLVersionProfile versionProfile();
|
@ -3,7 +3,7 @@
|
||||
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
/*!
|
||||
\class QOpenGLFunctions_4_2_Compatibility
|
||||
\inmodule QtGui
|
||||
\inmodule QtOpenGL
|
||||
\since 5.1
|
||||
\wrapper
|
||||
\brief The QOpenGLFunctions_4_2_Compatibility class provides all functions for OpenGL 4.2 compatibility profile.
|
@ -4,7 +4,7 @@
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -50,11 +50,12 @@
|
||||
#ifndef QOPENGLVERSIONFUNCTIONS_4_2_COMPATIBILITY_H
|
||||
#define QOPENGLVERSIONFUNCTIONS_4_2_COMPATIBILITY_H
|
||||
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
#include <QtOpenGL/qtopenglglobal.h>
|
||||
|
||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
||||
|
||||
#include <QtGui/QOpenGLVersionFunctions>
|
||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||
#include <QtGui/qopenglcontext.h>
|
||||
|
||||
// MemoryBarrier is a macro on some architectures on Windows
|
||||
@ -65,7 +66,7 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Q_GUI_EXPORT QOpenGLFunctions_4_2_Compatibility : public QAbstractOpenGLFunctions
|
||||
class Q_OPENGL_EXPORT QOpenGLFunctions_4_2_Compatibility : public QAbstractOpenGLFunctions
|
||||
{
|
||||
public:
|
||||
QOpenGLFunctions_4_2_Compatibility();
|
||||
@ -1036,7 +1037,7 @@ public:
|
||||
// OpenGL 4.2 deprecated functions
|
||||
|
||||
private:
|
||||
friend class QOpenGLContext;
|
||||
friend class QOpenGLVersionFunctionsFactory;
|
||||
|
||||
static bool isContextCompatible(QOpenGLContext *context);
|
||||
static QOpenGLVersionProfile versionProfile();
|
@ -3,7 +3,7 @@
|
||||
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
/*!
|
||||
\class QOpenGLFunctions_4_2_Core
|
||||
\inmodule QtGui
|
||||
\inmodule QtOpenGL
|
||||
\since 5.1
|
||||
\wrapper
|
||||
\brief The QOpenGLFunctions_4_2_Core class provides all functions for OpenGL 4.2 core profile.
|
@ -4,7 +4,7 @@
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -50,11 +50,12 @@
|
||||
#ifndef QOPENGLVERSIONFUNCTIONS_4_2_CORE_H
|
||||
#define QOPENGLVERSIONFUNCTIONS_4_2_CORE_H
|
||||
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
#include <QtOpenGL/qtopenglglobal.h>
|
||||
|
||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
||||
|
||||
#include <QtGui/QOpenGLVersionFunctions>
|
||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||
#include <QtGui/qopenglcontext.h>
|
||||
|
||||
// MemoryBarrier is a macro on some architectures on Windows
|
||||
@ -65,7 +66,7 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Q_GUI_EXPORT QOpenGLFunctions_4_2_Core : public QAbstractOpenGLFunctions
|
||||
class Q_OPENGL_EXPORT QOpenGLFunctions_4_2_Core : public QAbstractOpenGLFunctions
|
||||
{
|
||||
public:
|
||||
QOpenGLFunctions_4_2_Core();
|
||||
@ -571,7 +572,7 @@ public:
|
||||
void glDrawArraysInstancedBaseInstance(GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance);
|
||||
|
||||
private:
|
||||
friend class QOpenGLContext;
|
||||
friend class QOpenGLVersionFunctionsFactory;
|
||||
|
||||
static bool isContextCompatible(QOpenGLContext *context);
|
||||
static QOpenGLVersionProfile versionProfile();
|
@ -3,7 +3,7 @@
|
||||
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
/*!
|
||||
\class QOpenGLFunctions_4_3_Compatibility
|
||||
\inmodule QtGui
|
||||
\inmodule QtOpenGL
|
||||
\since 5.1
|
||||
\wrapper
|
||||
\brief The QOpenGLFunctions_4_3_Compatibility class provides all functions for OpenGL 4.3 compatibility profile.
|
@ -4,7 +4,7 @@
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -50,11 +50,12 @@
|
||||
#ifndef QOPENGLVERSIONFUNCTIONS_4_3_COMPATIBILITY_H
|
||||
#define QOPENGLVERSIONFUNCTIONS_4_3_COMPATIBILITY_H
|
||||
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
#include <QtOpenGL/qtopenglglobal.h>
|
||||
|
||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
||||
|
||||
#include <QtGui/QOpenGLVersionFunctions>
|
||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||
#include <QtGui/qopenglcontext.h>
|
||||
|
||||
// MemoryBarrier is a macro on some architectures on Windows
|
||||
@ -65,7 +66,7 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Q_GUI_EXPORT QOpenGLFunctions_4_3_Compatibility : public QAbstractOpenGLFunctions
|
||||
class Q_OPENGL_EXPORT QOpenGLFunctions_4_3_Compatibility : public QAbstractOpenGLFunctions
|
||||
{
|
||||
public:
|
||||
QOpenGLFunctions_4_3_Compatibility();
|
||||
@ -1073,7 +1074,7 @@ public:
|
||||
// OpenGL 4.3 deprecated functions
|
||||
|
||||
private:
|
||||
friend class QOpenGLContext;
|
||||
friend class QOpenGLVersionFunctionsFactory;
|
||||
|
||||
static bool isContextCompatible(QOpenGLContext *context);
|
||||
static QOpenGLVersionProfile versionProfile();
|
@ -3,7 +3,7 @@
|
||||
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
/*!
|
||||
\class QOpenGLFunctions_4_3_Core
|
||||
\inmodule QtGui
|
||||
\inmodule QtOpenGL
|
||||
\since 5.1
|
||||
\wrapper
|
||||
\brief The QOpenGLFunctions_4_3_Core class provides all functions for OpenGL 4.3 core profile.
|
@ -4,7 +4,7 @@
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -50,11 +50,12 @@
|
||||
#ifndef QOPENGLVERSIONFUNCTIONS_4_3_CORE_H
|
||||
#define QOPENGLVERSIONFUNCTIONS_4_3_CORE_H
|
||||
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
#include <QtOpenGL/qtopenglglobal.h>
|
||||
|
||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
||||
|
||||
#include <QtGui/QOpenGLVersionFunctions>
|
||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||
#include <QtGui/qopenglcontext.h>
|
||||
|
||||
// MemoryBarrier is a macro on some architectures on Windows
|
||||
@ -66,7 +67,7 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Q_GUI_EXPORT QOpenGLFunctions_4_3_Core : public QAbstractOpenGLFunctions
|
||||
class Q_OPENGL_EXPORT QOpenGLFunctions_4_3_Core : public QAbstractOpenGLFunctions
|
||||
{
|
||||
public:
|
||||
QOpenGLFunctions_4_3_Core();
|
||||
@ -607,7 +608,7 @@ public:
|
||||
void glClearBufferData(GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data);
|
||||
|
||||
private:
|
||||
friend class QOpenGLContext;
|
||||
friend class QOpenGLVersionFunctionsFactory;
|
||||
|
||||
static bool isContextCompatible(QOpenGLContext *context);
|
||||
static QOpenGLVersionProfile versionProfile();
|
@ -3,7 +3,7 @@
|
||||
** Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB)
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
/*!
|
||||
\class QOpenGLFunctions_4_4_Compatibility
|
||||
\inmodule QtGui
|
||||
\inmodule QtOpenGL
|
||||
\since 5.5
|
||||
\wrapper
|
||||
\brief The QOpenGLFunctions_4_4_Compatibility class provides all functions for OpenGL 4.4 compatibility profile.
|
@ -4,7 +4,7 @@
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -50,11 +50,12 @@
|
||||
#ifndef QOPENGLVERSIONFUNCTIONS_4_4_COMPATIBILITY_H
|
||||
#define QOPENGLVERSIONFUNCTIONS_4_4_COMPATIBILITY_H
|
||||
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
#include <QtOpenGL/qtopenglglobal.h>
|
||||
|
||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
||||
|
||||
#include <QtGui/QOpenGLVersionFunctions>
|
||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||
#include <QtGui/qopenglcontext.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
@ -65,7 +66,7 @@ QT_BEGIN_NAMESPACE
|
||||
#undef MemoryBarrier
|
||||
#endif
|
||||
|
||||
class Q_GUI_EXPORT QOpenGLFunctions_4_4_Compatibility : public QAbstractOpenGLFunctions
|
||||
class Q_OPENGL_EXPORT QOpenGLFunctions_4_4_Compatibility : public QAbstractOpenGLFunctions
|
||||
{
|
||||
public:
|
||||
QOpenGLFunctions_4_4_Compatibility();
|
||||
@ -1096,7 +1097,7 @@ public:
|
||||
// OpenGL 4.4 deprecated functions
|
||||
|
||||
private:
|
||||
friend class QOpenGLContext;
|
||||
friend class QOpenGLVersionFunctionsFactory;
|
||||
|
||||
static bool isContextCompatible(QOpenGLContext *context);
|
||||
static QOpenGLVersionProfile versionProfile();
|
@ -3,7 +3,7 @@
|
||||
** Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB)
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
/*!
|
||||
\class QOpenGLFunctions_4_4_Core
|
||||
\inmodule QtGui
|
||||
\inmodule QtOpenGL
|
||||
\since 5.5
|
||||
\wrapper
|
||||
\brief The QOpenGLFunctions_4_4_Core class provides all functions for OpenGL 4.4 core profile.
|
@ -4,7 +4,7 @@
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -50,11 +50,12 @@
|
||||
#ifndef QOPENGLVERSIONFUNCTIONS_4_4_CORE_H
|
||||
#define QOPENGLVERSIONFUNCTIONS_4_4_CORE_H
|
||||
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
#include <QtOpenGL/qtopenglglobal.h>
|
||||
|
||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
||||
|
||||
#include <QtGui/QOpenGLVersionFunctions>
|
||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||
#include <QtGui/qopenglcontext.h>
|
||||
|
||||
// MemoryBarrier is a macro on some architectures on Windows
|
||||
@ -65,7 +66,7 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Q_GUI_EXPORT QOpenGLFunctions_4_4_Core : public QAbstractOpenGLFunctions
|
||||
class Q_OPENGL_EXPORT QOpenGLFunctions_4_4_Core : public QAbstractOpenGLFunctions
|
||||
{
|
||||
public:
|
||||
QOpenGLFunctions_4_4_Core();
|
||||
@ -650,7 +651,7 @@ public:
|
||||
void glBufferStorage(GLenum target, GLsizeiptr size, const void *data, GLbitfield flags);
|
||||
|
||||
private:
|
||||
friend class QOpenGLContext;
|
||||
friend class QOpenGLVersionFunctionsFactory;
|
||||
|
||||
static bool isContextCompatible(QOpenGLContext *context);
|
||||
static QOpenGLVersionProfile versionProfile();
|
@ -3,7 +3,7 @@
|
||||
** Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB)
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
/*!
|
||||
\class QOpenGLFunctions_4_5_Compatibility
|
||||
\inmodule QtGui
|
||||
\inmodule QtOpenGL
|
||||
\since 5.5
|
||||
\wrapper
|
||||
\brief The QOpenGLFunctions_4_5_Compatibility class provides all functions for OpenGL 4.5 compatibility profile.
|
@ -4,7 +4,7 @@
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -50,11 +50,12 @@
|
||||
#ifndef QOPENGLVERSIONFUNCTIONS_4_5_COMPATIBILITY_H
|
||||
#define QOPENGLVERSIONFUNCTIONS_4_5_COMPATIBILITY_H
|
||||
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
#include <QtOpenGL/qtopenglglobal.h>
|
||||
|
||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
||||
|
||||
#include <QtGui/QOpenGLVersionFunctions>
|
||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||
#include <QtGui/qopenglcontext.h>
|
||||
|
||||
// MemoryBarrier is a macro on some architectures on Windows
|
||||
@ -65,7 +66,7 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Q_GUI_EXPORT QOpenGLFunctions_4_5_Compatibility : public QAbstractOpenGLFunctions
|
||||
class Q_OPENGL_EXPORT QOpenGLFunctions_4_5_Compatibility : public QAbstractOpenGLFunctions
|
||||
{
|
||||
public:
|
||||
QOpenGLFunctions_4_5_Compatibility();
|
||||
@ -1218,7 +1219,7 @@ public:
|
||||
void glGetnMapdv(GLenum target, GLenum query, GLsizei bufSize, GLdouble *v);
|
||||
|
||||
private:
|
||||
friend class QOpenGLContext;
|
||||
friend class QOpenGLVersionFunctionsFactory;
|
||||
|
||||
static bool isContextCompatible(QOpenGLContext *context);
|
||||
static QOpenGLVersionProfile versionProfile();
|
@ -3,7 +3,7 @@
|
||||
** Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB)
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
/*!
|
||||
\class QOpenGLFunctions_4_5_Core
|
||||
\inmodule QtGui
|
||||
\inmodule QtOpenGL
|
||||
\since 5.5
|
||||
\wrapper
|
||||
\brief The QOpenGLFunctions_4_5_Core class provides all functions for OpenGL 4.5 core profile.
|
@ -4,7 +4,7 @@
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -50,11 +50,12 @@
|
||||
#ifndef QOPENGLVERSIONFUNCTIONS_4_5_CORE_H
|
||||
#define QOPENGLVERSIONFUNCTIONS_4_5_CORE_H
|
||||
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
#include <QtOpenGL/qtopenglglobal.h>
|
||||
|
||||
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
|
||||
|
||||
#include <QtGui/QOpenGLVersionFunctions>
|
||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||
#include <QtGui/qopenglcontext.h>
|
||||
|
||||
// MemoryBarrier is a macro on some architectures on Windows
|
||||
@ -65,7 +66,7 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class Q_GUI_EXPORT QOpenGLFunctions_4_5_Core : public QAbstractOpenGLFunctions
|
||||
class Q_OPENGL_EXPORT QOpenGLFunctions_4_5_Core : public QAbstractOpenGLFunctions
|
||||
{
|
||||
public:
|
||||
QOpenGLFunctions_4_5_Core();
|
||||
@ -758,7 +759,7 @@ public:
|
||||
void glClipControl(GLenum origin, GLenum depth);
|
||||
|
||||
private:
|
||||
friend class QOpenGLContext;
|
||||
friend class QOpenGLVersionFunctionsFactory;
|
||||
|
||||
static bool isContextCompatible(QOpenGLContext *context);
|
||||
static QOpenGLVersionProfile versionProfile();
|
@ -3,7 +3,7 @@
|
||||
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -44,7 +44,7 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
/*!
|
||||
\class QOpenGLFunctions_ES2
|
||||
\inmodule QtGui
|
||||
\inmodule QtOpenGL
|
||||
\since 5.1
|
||||
\wrapper
|
||||
\brief The QOpenGLFunctions_ES2 class provides all functions for OpenGL ES 2.
|
@ -3,7 +3,7 @@
|
||||
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -40,18 +40,19 @@
|
||||
#ifndef QOPENGLVERSIONFUNCTIONS_ES2_H
|
||||
#define QOPENGLVERSIONFUNCTIONS_ES2_H
|
||||
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
#include <QtOpenGL/qtopenglglobal.h>
|
||||
|
||||
#if defined(QT_OPENGL_ES_2) || defined(Q_QDOC)
|
||||
|
||||
#include <QtGui/QOpenGLVersionFunctions>
|
||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||
#include <QtOpenGL/QOpenGLVersionFunctions>
|
||||
#include <QtGui/qopenglcontext.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QOpenGLFunctions_ES2Private;
|
||||
|
||||
class Q_GUI_EXPORT QOpenGLFunctions_ES2 : public QAbstractOpenGLFunctions
|
||||
class Q_OPENGL_EXPORT QOpenGLFunctions_ES2 : public QAbstractOpenGLFunctions
|
||||
{
|
||||
public:
|
||||
QOpenGLFunctions_ES2();
|
@ -40,6 +40,7 @@
|
||||
#include "qopenglshaderprogram.h"
|
||||
#include "qopenglextrafunctions.h"
|
||||
#include "private/qopenglcontext_p.h"
|
||||
#include <QtOpenGL/QOpenGLVersionFunctionsFactory>
|
||||
#include <QtCore/private/qobject_p.h>
|
||||
#include <QtCore/qdebug.h>
|
||||
#include <QtCore/qfile.h>
|
||||
@ -52,7 +53,7 @@
|
||||
#include <QtGui/QSurfaceFormat>
|
||||
|
||||
#if !defined(QT_OPENGL_ES_2)
|
||||
#include <QtGui/qopenglfunctions_4_0_core.h>
|
||||
#include <QtOpenGL/qopenglfunctions_4_0_core.h>
|
||||
#endif
|
||||
|
||||
#include <algorithm>
|
||||
@ -896,7 +897,7 @@ bool QOpenGLShaderProgram::init()
|
||||
|
||||
#ifndef QT_OPENGL_ES_2
|
||||
if (!context->isOpenGLES() && context->format().version() >= qMakePair(4, 0)) {
|
||||
d->tessellationFuncs = context->versionFunctions<QOpenGLFunctions_4_0_Core>();
|
||||
d->tessellationFuncs = QOpenGLVersionFunctionsFactory::get<QOpenGLFunctions_4_0_Core>(context);
|
||||
d->tessellationFuncs->initializeOpenGLFunctions();
|
||||
}
|
||||
#endif
|
||||
|
@ -4,7 +4,7 @@
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -48,11 +48,40 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "qopenglversionfunctions.h"
|
||||
#include "qopenglversionfunctions_p.h"
|
||||
#include "qopenglcontext.h"
|
||||
#include "qdebug.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
QOpenGLContextVersionData::~QOpenGLContextVersionData()
|
||||
{
|
||||
for (auto *f : qAsConst(externalFunctions)) {
|
||||
auto *fp = QAbstractOpenGLFunctionsPrivate::get(f);
|
||||
fp->owningContext = nullptr;
|
||||
fp->initialized = false;
|
||||
}
|
||||
externalFunctions.clear();
|
||||
qDeleteAll(functions);
|
||||
functions.clear();
|
||||
}
|
||||
|
||||
QOpenGLContextVersionData *QOpenGLContextVersionData::forContext(QOpenGLContext *context)
|
||||
{
|
||||
auto *data = contextData.value(context);
|
||||
if (!data) {
|
||||
data = new QOpenGLContextVersionData;
|
||||
// The data will live as long as the context. It could potentially be an opaque pointer
|
||||
// member of QOpenGLContextPrivate, but this avoids polluting QOpenGLContext with version
|
||||
// functions specifics
|
||||
QObject::connect(context, &QObject::destroyed, context, [data](){ delete data; }, Qt::DirectConnection);
|
||||
contextData[context] = data;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
QMap<QOpenGLContext *, QOpenGLContextVersionData *> QOpenGLContextVersionData::contextData;
|
||||
|
||||
#define QT_OPENGL_COUNT_FUNCTIONS(ret, name, args) +1
|
||||
#define QT_OPENGL_FUNCTION_NAMES(ret, name, args) \
|
||||
"gl"#name"\0"
|
||||
@ -124,25 +153,24 @@ QOpenGLVersionFunctionsBackend *QOpenGLVersionFunctionsStorage::backend(QOpenGLC
|
||||
QOpenGLVersionFunctionsBackend *QAbstractOpenGLFunctionsPrivate::functionsBackend(QOpenGLContext *context, QOpenGLVersionFunctionsBackend::Version v)
|
||||
{
|
||||
Q_ASSERT(context);
|
||||
QOpenGLVersionFunctionsStorage *storage = context->functionsBackendStorage();
|
||||
return storage->backend(context, v);
|
||||
return QOpenGLContextVersionData::forContext(context)->functionsStorage.backend(context, v);
|
||||
}
|
||||
|
||||
void QAbstractOpenGLFunctionsPrivate::insertExternalFunctions(QOpenGLContext *context, QAbstractOpenGLFunctions *f)
|
||||
{
|
||||
Q_ASSERT(context);
|
||||
context->insertExternalFunctions(f);
|
||||
QOpenGLContextVersionData::forContext(context)->externalFunctions.insert(f);
|
||||
}
|
||||
|
||||
void QAbstractOpenGLFunctionsPrivate::removeExternalFunctions(QOpenGLContext *context, QAbstractOpenGLFunctions *f)
|
||||
{
|
||||
Q_ASSERT(context);
|
||||
context->removeExternalFunctions(f);
|
||||
QOpenGLContextVersionData::forContext(context)->externalFunctions.remove(f);
|
||||
}
|
||||
|
||||
/*!
|
||||
\class QAbstractOpenGLFunctions
|
||||
\inmodule QtGui
|
||||
\inmodule QtOpenGL
|
||||
\since 5.1
|
||||
\brief The QAbstractOpenGLFunctions class is the base class of a family of
|
||||
classes that expose all functions for each OpenGL version and
|
@ -4,7 +4,7 @@
|
||||
** Copyright (C) 2016 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -50,7 +50,7 @@
|
||||
#ifndef QOPENGLVERSIONFUNCTIONS_H
|
||||
#define QOPENGLVERSIONFUNCTIONS_H
|
||||
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
#include <QtOpenGL/qtopenglglobal.h>
|
||||
|
||||
#ifndef QT_NO_OPENGL
|
||||
|
||||
@ -213,7 +213,7 @@ public:
|
||||
bool initialized;
|
||||
};
|
||||
|
||||
class Q_GUI_EXPORT QAbstractOpenGLFunctions
|
||||
class Q_OPENGL_EXPORT QAbstractOpenGLFunctions
|
||||
{
|
||||
public:
|
||||
virtual ~QAbstractOpenGLFunctions();
|
||||
@ -232,7 +232,7 @@ protected:
|
||||
void setOwningContext(const QOpenGLContext *context);
|
||||
QOpenGLContext *owningContext() const;
|
||||
|
||||
friend class QOpenGLContext;
|
||||
friend class QOpenGLVersionFunctionsFactory;
|
||||
};
|
||||
|
||||
inline QAbstractOpenGLFunctionsPrivate *QAbstractOpenGLFunctionsPrivate::get(QAbstractOpenGLFunctions *q)
|
@ -3,7 +3,7 @@
|
||||
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -46,8 +46,8 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QOPENGLVERSIONFUNCTIONFACTORY_P_H
|
||||
#define QOPENGLVERSIONFUNCTIONFACTORY_P_H
|
||||
#ifndef QOPENGLVERSIONFUNCTION_H
|
||||
#define QOPENGLVERSIONFUNCTION_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
@ -60,24 +60,28 @@
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtGui/private/qtguiglobal_p.h>
|
||||
#include "qopenglversionfunctions.h"
|
||||
|
||||
#ifndef QT_NO_OPENGL
|
||||
|
||||
#include <QtGui/qopenglcontext.h>
|
||||
#include <QtOpenGL/qtopenglglobal.h>
|
||||
#include <QtOpenGL/QOpenGLVersionProfile>
|
||||
#include <QtCore/QSet>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QAbstractOpenGLFunctions;
|
||||
|
||||
class QOpenGLVersionFunctionsFactory
|
||||
{
|
||||
class QOpenGLContextVersionData {
|
||||
public:
|
||||
static QAbstractOpenGLFunctions *create(const QOpenGLVersionProfile &versionProfile);
|
||||
QHash<QOpenGLVersionProfile, QAbstractOpenGLFunctions *> functions;
|
||||
QOpenGLVersionFunctionsStorage functionsStorage;
|
||||
QSet<QAbstractOpenGLFunctions *> externalFunctions;
|
||||
// TODO: who calls delete?
|
||||
~QOpenGLContextVersionData();
|
||||
static QOpenGLContextVersionData *forContext(QOpenGLContext *context);
|
||||
private:
|
||||
static QMap<QOpenGLContext *, QOpenGLContextVersionData *> contextData;
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_OPENGL
|
||||
|
||||
#endif
|
@ -3,7 +3,7 @@
|
||||
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -46,7 +46,8 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "qopenglversionfunctionsfactory_p.h"
|
||||
#include "qopenglversionfunctionsfactory.h"
|
||||
#include "qopenglversionfunctions_p.h"
|
||||
|
||||
#if !defined(QT_OPENGL_ES_2)
|
||||
#include "qopenglfunctions_4_5_core.h"
|
||||
@ -81,7 +82,7 @@
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
QAbstractOpenGLFunctions *QOpenGLVersionFunctionsFactory::create(const QOpenGLVersionProfile &versionProfile)
|
||||
static QAbstractOpenGLFunctions *createFunctions(const QOpenGLVersionProfile &versionProfile)
|
||||
{
|
||||
#if !defined(QT_OPENGL_ES_2)
|
||||
const int major = versionProfile.version().first;
|
||||
@ -160,4 +161,120 @@ QAbstractOpenGLFunctions *QOpenGLVersionFunctionsFactory::create(const QOpenGLVe
|
||||
#endif
|
||||
}
|
||||
|
||||
/*!
|
||||
\fn static T *QOpenGLVersionFunctionsFactory::get(QOpenGLContext *context)
|
||||
|
||||
\overload get()
|
||||
|
||||
Returns a pointer to an object that provides access to all functions for
|
||||
the version and profile of this context. There is no need to call
|
||||
QAbstractOpenGLFunctions::initializeOpenGLFunctions() as long as the \a context
|
||||
is current. It is also possible to call this function when the \a context is not
|
||||
current, but in that case it is the caller's responsibility to ensure proper
|
||||
initialization by calling QAbstractOpenGLFunctions::initializeOpenGLFunctions()
|
||||
afterwards.
|
||||
|
||||
Usually one would use the template version of this function to automatically
|
||||
have the result cast to the correct type.
|
||||
|
||||
\code
|
||||
auto funcs = QOpenGLVersionFunctionsFactory::get<QOpenGLFunctions_3_3_Core>(context);
|
||||
if (!funcs) {
|
||||
qFatal("Could not obtain required OpenGL context version");
|
||||
}
|
||||
\endcode
|
||||
|
||||
It is possible to request a functions object for a different version and profile
|
||||
than that for which the context was created. To do this either use the template
|
||||
version of this function specifying the desired functions object type as the
|
||||
template parameter or by passing in a QOpenGLVersionProfile object as an argument
|
||||
to the non-template function.
|
||||
|
||||
Note that requests for function objects of other versions or profiles can fail and
|
||||
in doing so will return \nullptr. Situations in which creation of the functions
|
||||
object can fail are if the request cannot be satisfied due to asking for functions
|
||||
that are not in the version or profile of this context. For example:
|
||||
|
||||
\list
|
||||
\li Requesting a 3.3 core profile functions object would succeed.
|
||||
\li Requesting a 3.3 compatibility profile functions object would fail. We would fail
|
||||
to resolve the deprecated functions.
|
||||
\li Requesting a 4.3 core profile functions object would fail. We would fail to resolve
|
||||
the new core functions introduced in versions 4.0-4.3.
|
||||
\li Requesting a 3.1 functions object would succeed. There is nothing in 3.1 that is not
|
||||
also in 3.3 core.
|
||||
\endlist
|
||||
|
||||
Note that if creating a functions object via this method that the QOpenGLContext
|
||||
retains ownership of the object. This is to allow the object to be cached and shared.
|
||||
*/
|
||||
|
||||
/*!
|
||||
Returns a pointer to an object that provides access to all functions for the
|
||||
\a versionProfile of the \a context. There is no need to call
|
||||
QAbstractOpenGLFunctions::initializeOpenGLFunctions() as long as the \a context
|
||||
is current. It is also possible to call this function when the \a context is not
|
||||
current, but in that case it is the caller's responsibility to ensure proper
|
||||
initialization by calling QAbstractOpenGLFunctions::initializeOpenGLFunctions()
|
||||
afterwards.
|
||||
|
||||
Usually one would use the template version of this function to automatically
|
||||
have the result cast to the correct type.
|
||||
*/
|
||||
QAbstractOpenGLFunctions *QOpenGLVersionFunctionsFactory::get(const QOpenGLVersionProfile &versionProfile, QOpenGLContext *context)
|
||||
{
|
||||
if (!context)
|
||||
context = QOpenGLContext::currentContext();
|
||||
|
||||
if (!context) {
|
||||
qWarning("versionFunctions: No OpenGL context");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
#ifndef QT_OPENGL_ES_2
|
||||
if (context->isOpenGLES()) {
|
||||
qWarning("versionFunctions: Not supported on OpenGL ES");
|
||||
return nullptr;
|
||||
}
|
||||
#endif // QT_OPENGL_ES_2
|
||||
|
||||
const QSurfaceFormat f = context->format();
|
||||
|
||||
// Ensure we have a valid version and profile. Default to context's if none specified
|
||||
QOpenGLVersionProfile vp = versionProfile;
|
||||
if (!vp.isValid())
|
||||
vp = QOpenGLVersionProfile(f);
|
||||
|
||||
// Check that context is compatible with requested version
|
||||
const QPair<int, int> v = qMakePair(f.majorVersion(), f.minorVersion());
|
||||
if (v < vp.version())
|
||||
return nullptr;
|
||||
|
||||
// If this context only offers core profile functions then we can't create
|
||||
// function objects for legacy or compatibility profile requests
|
||||
if (((vp.hasProfiles() && vp.profile() != QSurfaceFormat::CoreProfile) || vp.isLegacyVersion())
|
||||
&& f.profile() == QSurfaceFormat::CoreProfile)
|
||||
return nullptr;
|
||||
|
||||
// Create object if suitable one not cached
|
||||
QAbstractOpenGLFunctions* funcs = nullptr;
|
||||
// TODO: replace with something else
|
||||
auto *data = QOpenGLContextVersionData::forContext(context);
|
||||
auto it = data->functions.constFind(vp);
|
||||
if (it == data->functions.constEnd()) {
|
||||
funcs = createFunctions(vp);
|
||||
if (funcs) {
|
||||
funcs->setOwningContext(context);
|
||||
data->functions.insert(vp, funcs);
|
||||
}
|
||||
} else {
|
||||
funcs = it.value();
|
||||
}
|
||||
|
||||
if (funcs && QOpenGLContext::currentContext() == context)
|
||||
funcs->initializeOpenGLFunctions();
|
||||
|
||||
return funcs;
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
74
src/opengl/qopenglversionfunctionsfactory.h
Normal file
74
src/opengl/qopenglversionfunctionsfactory.h
Normal file
@ -0,0 +1,74 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB)
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
**
|
||||
** This file was generated by glgen version 0.1
|
||||
** Command line was: glgen
|
||||
**
|
||||
** glgen is Copyright (C) 2012 Klaralvdalens Datakonsult AB (KDAB)
|
||||
**
|
||||
** This is an auto-generated file.
|
||||
** Do not edit! All changes made to it will be lost.
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef QOPENGLVERSIONFUNCTIONFACTORY_H
|
||||
#define QOPENGLVERSIONFUNCTIONFACTORY_H
|
||||
|
||||
#include <QtOpenGL/qtopenglglobal.h>
|
||||
#include <QtOpenGL/qopenglversionprofile.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QAbstractOpenGLFunctions;
|
||||
class QOpenGLContext;
|
||||
|
||||
class Q_OPENGL_EXPORT QOpenGLVersionFunctionsFactory
|
||||
{
|
||||
public:
|
||||
static QAbstractOpenGLFunctions *get(const QOpenGLVersionProfile &versionProfile = QOpenGLVersionProfile(), QOpenGLContext *context = nullptr);
|
||||
template<class TYPE>
|
||||
static TYPE *get(QOpenGLContext *context = nullptr)
|
||||
{
|
||||
QOpenGLVersionProfile v = TYPE::versionProfile();
|
||||
return static_cast<TYPE*>(get(v, context));
|
||||
}
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif
|
@ -3,7 +3,7 @@
|
||||
** Copyright (C) 2020 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -59,7 +59,7 @@ public:
|
||||
|
||||
/*!
|
||||
\class QOpenGLVersionProfile
|
||||
\inmodule QtGui
|
||||
\inmodule QtOpenGL
|
||||
\since 5.1
|
||||
\brief The QOpenGLVersionProfile class represents the version and if applicable
|
||||
the profile of an OpenGL context.
|
@ -3,7 +3,7 @@
|
||||
** Copyright (C) 2020 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the QtGui module of the Qt Toolkit.
|
||||
** This file is part of the QtOpenGL module of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
@ -40,7 +40,7 @@
|
||||
#ifndef QOPENGLVERSIONPROFILE_H
|
||||
#define QOPENGLVERSIONPROFILE_H
|
||||
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
#include <QtOpenGL/qtopenglglobal.h>
|
||||
|
||||
#include <QtGui/QSurfaceFormat>
|
||||
|
||||
@ -50,14 +50,12 @@
|
||||
#endif
|
||||
#include <QtCore/qhashfunctions.h>
|
||||
|
||||
#ifndef QT_NO_OPENGL
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QOpenGLVersionProfilePrivate;
|
||||
class QDebug;
|
||||
|
||||
class Q_GUI_EXPORT QOpenGLVersionProfile
|
||||
class Q_OPENGL_EXPORT QOpenGLVersionProfile
|
||||
{
|
||||
public:
|
||||
QOpenGLVersionProfile();
|
||||
@ -100,11 +98,9 @@ inline bool operator!=(const QOpenGLVersionProfile &lhs, const QOpenGLVersionPro
|
||||
}
|
||||
|
||||
#ifndef QT_NO_DEBUG_STREAM
|
||||
Q_GUI_EXPORT QDebug operator<<(QDebug debug, const QOpenGLVersionProfile &vp);
|
||||
Q_OPENGL_EXPORT QDebug operator<<(QDebug debug, const QOpenGLVersionProfile &vp);
|
||||
#endif // !QT_NO_DEBUG_STREAM
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QT_NO_OPENGL
|
||||
|
||||
#endif // QOPENGLVERSIONPROFILE_H
|
@ -45,8 +45,9 @@
|
||||
#include <QtGui/qoffscreensurface.h>
|
||||
#include <QtGui/qguiapplication.h>
|
||||
|
||||
#include <QtGui/qopenglfunctions_3_0.h>
|
||||
#include <QtGui/qopenglfunctions_3_2_core.h>
|
||||
#include <QtOpenGL/QOpenGLVersionFunctionsFactory>
|
||||
#include <QtOpenGL/qopenglfunctions_3_0.h>
|
||||
#include <QtOpenGL/qopenglfunctions_3_2_core.h>
|
||||
|
||||
#include <private/qopenglextensions_p.h>
|
||||
#include <private/qopenglvertexarrayobject_p.h>
|
||||
@ -172,11 +173,11 @@ bool QOpenGLVertexArrayObjectPrivate::create()
|
||||
QSurfaceFormat format = ctx->format();
|
||||
#ifndef QT_OPENGL_ES_2
|
||||
if (format.version() >= qMakePair<int, int>(3,2)) {
|
||||
vaoFuncs.core_3_2 = ctx->versionFunctions<QOpenGLFunctions_3_2_Core>();
|
||||
vaoFuncs.core_3_2 = QOpenGLVersionFunctionsFactory::get<QOpenGLFunctions_3_2_Core>(ctx);
|
||||
vaoFuncsType = Core_3_2;
|
||||
vaoFuncs.core_3_2->glGenVertexArrays(1, &vao);
|
||||
} else if (format.majorVersion() >= 3) {
|
||||
vaoFuncs.core_3_0 = ctx->versionFunctions<QOpenGLFunctions_3_0>();
|
||||
vaoFuncs.core_3_0 = QOpenGLVersionFunctionsFactory::get<QOpenGLFunctions_3_0>(ctx);
|
||||
vaoFuncsType = Core_3_0;
|
||||
vaoFuncs.core_3_0->glGenVertexArrays(1, &vao);
|
||||
} else
|
||||
|
@ -41,6 +41,7 @@
|
||||
#define QTOPENGLGLOBAL_H
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
#include <QtGui/qtguiglobal.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
|
@ -32,9 +32,10 @@
|
||||
#include <QtOpenGL/qopengltextureblitter.h>
|
||||
#include <QtOpenGL/QOpenGLVertexArrayObject>
|
||||
#include <QtOpenGL/QOpenGLBuffer>
|
||||
#include <QtOpenGL/QOpenGLFunctions_4_2_Core>
|
||||
#include <QtOpenGL/QOpenGLVersionFunctionsFactory>
|
||||
#include <QtGui/private/qopenglcontext_p.h>
|
||||
#include <QtGui/QOpenGLFunctions>
|
||||
#include <QtGui/QOpenGLFunctions_4_2_Core>
|
||||
#include <QtGui/QPainter>
|
||||
#include <QtGui/QPainterPath>
|
||||
#include <QtGui/QScreen>
|
||||
@ -635,7 +636,7 @@ static bool supportsInternalFboFormat(QOpenGLContext *ctx, int glFormat)
|
||||
#ifndef QT_OPENGL_ES_2
|
||||
if (!ctx->isOpenGLES() && ctx->format().majorVersion() >= 4) {
|
||||
GLint value = -1;
|
||||
QOpenGLFunctions_4_2_Core* vFuncs = ctx->versionFunctions<QOpenGLFunctions_4_2_Core>();
|
||||
auto *vFuncs = QOpenGLVersionFunctionsFactory::get<QOpenGLFunctions_4_2_Core>(ctx);
|
||||
if (vFuncs && vFuncs->initializeOpenGLFunctions()) {
|
||||
vFuncs->glGetInternalformativ(GL_TEXTURE_2D, glFormat, GL_FRAMEBUFFER_RENDERABLE, 1, &value);
|
||||
if (value != GL_FULL_SUPPORT)
|
||||
|
Loading…
Reference in New Issue
Block a user