42 #include <QtCore/qatomic.h>
43 #include <QtCore/QDebug>
44 #include <QOpenGLContext>
45 #include <QtGui/qcolorspace.h>
46 #include <QtGui/qguiapplication.h>
101 QSurfaceFormat::FormatOptions
opts;
253 void QSurfaceFormat::detach()
317 QSurfaceFormat::FormatOptions newOptions = d->
opts;
320 if (
int(newOptions) !=
int(d->
opts)) {
322 d->
opts = newOptions;
626 if (d->
major != major) {
649 if (d->
minor != minor) {
768 case DefaultColorSpace:
819 if (globalContext && globalContext->
isValid()) {
820 qWarning(
"Warning: Setting a new default format with a different version or profile "
821 "after the global shared context is created may cause issues with context "
826 *qt_default_surface_format() =
format;
839 return *qt_default_surface_format();
861 return (
d ==
other.d) || ((int)
d->opts == (
int)
other.d->opts
862 &&
d->stencilSize ==
other.d->stencilSize
863 &&
d->redBufferSize ==
other.d->redBufferSize
864 &&
d->greenBufferSize ==
other.d->greenBufferSize
865 &&
d->blueBufferSize ==
other.d->blueBufferSize
866 &&
d->alphaBufferSize ==
other.d->alphaBufferSize
867 &&
d->depthSize ==
other.d->depthSize
868 &&
d->numSamples ==
other.d->numSamples
869 &&
d->swapBehavior ==
other.d->swapBehavior
870 &&
d->profile ==
other.d->profile
871 &&
d->major ==
other.d->major
872 &&
d->minor ==
other.d->minor
873 &&
d->swapInterval ==
other.d->swapInterval);
876 #ifndef QT_NO_DEBUG_STREAM
882 dbg.
nospace() <<
"QSurfaceFormat("
883 <<
"version " <<
d->major <<
'.' <<
d->minor
884 <<
", options " <<
d->opts
885 <<
", depthBufferSize " <<
d->depthSize
886 <<
", redBufferSize " <<
d->redBufferSize
887 <<
", greenBufferSize " <<
d->greenBufferSize
888 <<
", blueBufferSize " <<
d->blueBufferSize
889 <<
", alphaBufferSize " <<
d->alphaBufferSize
890 <<
", stencilBufferSize " <<
d->stencilSize
891 <<
", samples " <<
d->numSamples
892 <<
", swapBehavior " <<
d->swapBehavior
893 <<
", swapInterval " <<
d->swapInterval
894 <<
", colorSpace " <<
d->colorSpace
895 <<
", profile " <<
d->profile
904 #include "moc_qsurfaceformat.cpp"
The QAtomicInt class provides platform-independent atomic operations on int.
T loadRelaxed() const noexcept
The QColorSpace class provides a color space abstraction.
operator<<(QDataStream &ds, qfloat16 f)
The QDebug class provides an output stream for debugging information.
Convenience class for custom QDebug operators.
The QOpenGLContext class represents a native OpenGL context, enabling OpenGL rendering on a QSurface.
static QOpenGLContext * globalShareContext()
auto it unsigned count const
std::pair< T1, T2 > QPair
#define Q_GLOBAL_STATIC(TYPE, NAME,...)
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLint GLsizei GLsizei GLenum format
constexpr decltype(auto) qMakePair(T1 &&value1, T2 &&value2) noexcept(noexcept(std::make_pair(std::forward< T1 >(value1), std::forward< T2 >(value2))))