Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qsurfaceformat.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
5
6#include <QtCore/qatomic.h>
7#include <QtCore/QDebug>
8#include <QOpenGLContext>
9#include <QtGui/qcolorspace.h>
10#include <QtGui/qguiapplication.h>
11
12#ifndef QT_NO_OPENGL
13#include <QtGui/private/qopenglcontext_p.h>
14#endif
15
16#ifdef major
17#undef major
18#endif
19
20#ifdef minor
21#undef minor
22#endif
23
25
27{
28public:
48
69
83 int major;
84 int minor;
86 QColorSpace colorSpace;
87};
88
89/*!
90 \class QSurfaceFormat
91 \since 5.0
92 \brief The QSurfaceFormat class represents the format of a QSurface.
93 \inmodule QtGui
94
95 The format includes the size of the color buffers, red, green, and blue;
96 the size of the alpha buffer; the size of the depth and stencil buffers;
97 and number of samples per pixel for multisampling. In addition, the format
98 contains surface configuration parameters such as OpenGL profile and
99 version for rendering, whether or not to enable stereo buffers, and swap
100 behaviour.
101
102 \note When troubleshooting context or window format issues, it can be
103 helpful to enable the logging category \c{qt.qpa.gl}. Depending on the
104 platform, this may print useful debug information when it comes to OpenGL
105 initialization and the native visual or framebuffer configurations which
106 QSurfaceFormat gets mapped to.
107*/
108
109/*!
110 \enum QSurfaceFormat::FormatOption
111
112 This enum contains format options for use with QSurfaceFormat.
113
114 \value StereoBuffers Used to request stereo buffers in the surface format.
115 \value DebugContext Used to request a debug context with extra debugging information.
116 \value DeprecatedFunctions Used to request that deprecated functions be included
117 in the OpenGL context profile. If not specified, you should get a forward compatible context
118 without support functionality marked as deprecated. This requires OpenGL version 3.0 or higher.
119 \value ResetNotification Enables notifications about resets of the OpenGL context. The status is then
120 queryable via the context's \l{QOpenGLContext::isValid()}{isValid()} function. Note that not setting
121 this flag does not guarantee that context state loss never occurs. Additionally, some implementations
122 may choose to report context loss regardless of this flag. Platforms that support dynamically enabling
123 the monitoring of the loss of context, such as, Windows with WGL, or Linux/X11 (xcb) with GLX, will
124 monitor the status in every call to \l{QOpenGLContext::makeCurrent()}{makeCurrent()}. See
125 \l{QOpenGLContext::isValid()}{isValid()} for more information on this.
126 \value ProtectedContent Enables access to protected content. This allows the GPU to operate on protected
127 resources (surfaces, buffers, textures), for example DRM-protected video content.
128 Currently only implemented for EGL.
129*/
130
131/*!
132 \enum QSurfaceFormat::SwapBehavior
133
134 This enum is used by QSurfaceFormat to specify the swap behaviour of a surface. The swap behaviour
135 is mostly transparent to the application, but it affects factors such as rendering latency and
136 throughput.
137
138 \value DefaultSwapBehavior The default, unspecified swap behaviour of the platform.
139 \value SingleBuffer Used to request single buffering, which might result in flickering
140 when OpenGL rendering is done directly to screen without an intermediate offscreen
141 buffer.
142 \value DoubleBuffer This is typically the default swap behaviour on desktop platforms,
143 consisting of one back buffer and one front buffer. Rendering is done to the back
144 buffer, and then the back buffer and front buffer are swapped, or the contents of
145 the back buffer are copied to the front buffer, depending on the implementation.
146 \value TripleBuffer This swap behaviour is sometimes used in order to decrease the
147 risk of skipping a frame when the rendering rate is just barely keeping up with
148 the screen refresh rate. Depending on the platform it might also lead to slightly
149 more efficient use of the GPU due to improved pipelining behaviour. Triple buffering
150 comes at the cost of an extra frame of memory usage and latency, and might not be
151 supported depending on the underlying platform.
152*/
153
154/*!
155 \enum QSurfaceFormat::RenderableType
156
157 This enum specifies the rendering backend for the surface.
158
159 \value DefaultRenderableType The default, unspecified rendering method
160 \value OpenGL Desktop OpenGL rendering
161 \value OpenGLES OpenGL ES 2.0 rendering
162 \value OpenVG Open Vector Graphics rendering
163*/
164
165/*!
166 \enum QSurfaceFormat::OpenGLContextProfile
167
168 This enum is used to specify the OpenGL context profile, in
169 conjunction with QSurfaceFormat::setMajorVersion() and
170 QSurfaceFormat::setMinorVersion().
171
172 Profiles are exposed in OpenGL 3.2 and above, and are used
173 to choose between a restricted core profile, and a compatibility
174 profile which might contain deprecated support functionality.
175
176 Note that the core profile might still contain functionality that
177 is deprecated and scheduled for removal in a higher version. To
178 get access to the deprecated functionality for the core profile
179 in the set OpenGL version you can use the QSurfaceFormat format option
180 QSurfaceFormat::DeprecatedFunctions.
181
182 \value NoProfile OpenGL version is lower than 3.2. For 3.2 and newer this is same as CoreProfile.
183 \value CoreProfile Functionality deprecated in OpenGL version 3.0 is not available.
184 \value CompatibilityProfile Functionality from earlier OpenGL versions is available.
185*/
186
187/*!
188 \enum QSurfaceFormat::ColorSpace
189 \deprecated [6.0] Use setColorSpace(QColorSpace) instead
190
191 This enum is used to specify the preferred color space, controlling if the
192 window's associated default framebuffer is able to do updates and blending
193 in a given encoding instead of the standard linear operations.
194
195 \value DefaultColorSpace The default, unspecified color space.
196
197 \value sRGBColorSpace When \c{GL_ARB_framebuffer_sRGB} or
198 \c{GL_EXT_framebuffer_sRGB} is supported by the platform and this value is
199 set, the window will be created with an sRGB-capable default
200 framebuffer. Note that some platforms may return windows with a sRGB-capable
201 default framebuffer even when not requested explicitly.
202 */
203
204/*!
205 \enum QSurfaceFormat::ColorComponentType
206 \since 6.11
207
208 This enum is used to specify the data type used for the surface buffer.
209
210 \value FixedColorComponentType Color components are stored as fixed point
211 fractional values.
212 \value FloatColorComponentType Color components are stored as floating point
213 values.
214
215 \sa colorComponentType(), redBufferSize(), greenBufferSize(), blueBufferSize()
216*/
217
218/*!
219 Constructs a default initialized QSurfaceFormat.
220
221 \note By default OpenGL 2.0 is requested since this provides the highest
222 grade of portability between platforms and OpenGL implementations.
223*/
224QSurfaceFormat::QSurfaceFormat() : d(new QSurfaceFormatPrivate)
225{
226}
227
228/*!
229 Constructs a QSurfaceFormat with the given format \a options.
230*/
231QSurfaceFormat::QSurfaceFormat(QSurfaceFormat::FormatOptions options) :
232 d(new QSurfaceFormatPrivate(options))
233{
234}
235
236/*!
237 \internal
238*/
239void QSurfaceFormat::detach()
240{
241 if (d->ref.loadRelaxed() != 1) {
242 QSurfaceFormatPrivate *newd = new QSurfaceFormatPrivate(d);
243 if (!d->ref.deref())
244 delete d;
245 d = newd;
246 }
247}
248
249/*!
250 Constructs a copy of \a other.
251*/
252QSurfaceFormat::QSurfaceFormat(const QSurfaceFormat &other)
253{
254 d = other.d;
255 d->ref.ref();
256}
257
258/*!
259 Assigns \a other to this object.
260*/
261QSurfaceFormat &QSurfaceFormat::operator=(const QSurfaceFormat &other)
262{
263 if (d != other.d) {
264 other.d->ref.ref();
265 if (!d->ref.deref())
266 delete d;
267 d = other.d;
268 }
269 return *this;
270}
271
272/*!
273 Destroys the QSurfaceFormat.
274*/
275QSurfaceFormat::~QSurfaceFormat()
276{
277 if (!d->ref.deref())
278 delete d;
279}
280
281/*!
282 \fn bool QSurfaceFormat::stereo() const
283
284 Returns \c true if stereo buffering is enabled; otherwise returns
285 false. Stereo buffering is disabled by default.
286
287 \sa setStereo()
288*/
289
290/*!
291 If \a enable is true enables stereo buffering; otherwise disables
292 stereo buffering.
293
294 Stereo buffering is disabled by default.
295
296 Stereo buffering provides extra color buffers to generate left-eye
297 and right-eye images.
298
299 \sa stereo()
300*/
301void QSurfaceFormat::setStereo(bool enable)
302{
303 QSurfaceFormat::FormatOptions newOptions = d->opts;
304 newOptions.setFlag(QSurfaceFormat::StereoBuffers, enable);
305
306 if (int(newOptions) != int(d->opts)) {
307 detach();
308 d->opts = newOptions;
309 }
310}
311
312/*!
313 Returns the number of samples per pixel when multisampling is
314 enabled, or \c -1 when multisampling is disabled. The default
315 return value is \c -1.
316
317 \sa setSamples()
318*/
319int QSurfaceFormat::samples() const
320{
321 return d->numSamples;
322}
323
324/*!
325 Set the preferred number of samples per pixel when multisampling
326 is enabled to \a numSamples. By default, multisampling is disabled.
327
328 \sa samples()
329*/
330void QSurfaceFormat::setSamples(int numSamples)
331{
332 if (d->numSamples != numSamples) {
333 detach();
334 d->numSamples = numSamples;
335 }
336}
337
338/*!
339 \since 5.3
340
341 Sets the format options to \a options.
342
343 To verify that an option was respected, compare the actual format to the
344 requested format after surface/context creation.
345
346 \sa options(), testOption()
347*/
348void QSurfaceFormat::setOptions(QSurfaceFormat::FormatOptions options)
349{
350 if (int(d->opts) != int(options)) {
351 detach();
352 d->opts = options;
353 }
354}
355
356/*!
357 \since 5.3
358
359 Sets the format option \a option if \a on is true; otherwise, clears the option.
360
361 To verify that an option was respected, compare the actual format to the
362 requested format after surface/context creation.
363
364 \sa setOptions(), options(), testOption()
365*/
366void QSurfaceFormat::setOption(QSurfaceFormat::FormatOption option, bool on)
367{
368 if (testOption(option) == on)
369 return;
370 detach();
371 if (on)
372 d->opts |= option;
373 else
374 d->opts &= ~option;
375}
376
377/*!
378 \since 5.3
379
380 Returns true if the format option \a option is set; otherwise returns false.
381
382 \sa options()
383*/
384bool QSurfaceFormat::testOption(QSurfaceFormat::FormatOption option) const
385{
386 return d->opts & option;
387}
388
389/*!
390 \since 5.3
391
392 Returns the currently set format options.
393
394 \sa setOption(), setOptions(), testOption()
395*/
396QSurfaceFormat::FormatOptions QSurfaceFormat::options() const
397{
398 return d->opts;
399}
400
401/*!
402 Set the minimum depth buffer size to \a size.
403
404 \sa depthBufferSize()
405*/
406void QSurfaceFormat::setDepthBufferSize(int size)
407{
408 if (d->depthSize != size) {
409 detach();
410 d->depthSize = size;
411 }
412}
413
414/*!
415 Returns the depth buffer size.
416
417 \sa setDepthBufferSize()
418*/
419int QSurfaceFormat::depthBufferSize() const
420{
421 return d->depthSize;
422}
423
424/*!
425 Set the swap \a behavior of the surface.
426
427 The swap behavior specifies whether single, double, or triple
428 buffering is desired. The default, DefaultSwapBehavior,
429 gives the default swap behavior of the platform.
430*/
431void QSurfaceFormat::setSwapBehavior(SwapBehavior behavior)
432{
433 if (d->swapBehavior != behavior) {
434 detach();
435 d->swapBehavior = behavior;
436 }
437}
438
439/*!
440 Returns the configured swap behaviour.
441
442 \sa setSwapBehavior()
443*/
444QSurfaceFormat::SwapBehavior QSurfaceFormat::swapBehavior() const
445{
446 return d->swapBehavior;
447}
448
449/*!
450 Returns \c true if the alpha buffer size is greater than zero.
451
452 This means that the surface might be used with per pixel
453 translucency effects.
454*/
455bool QSurfaceFormat::hasAlpha() const
456{
457 return d->alphaBufferSize > 0;
458}
459
460/*!
461 Set the preferred stencil buffer size to \a size bits.
462
463 \sa stencilBufferSize()
464*/
465void QSurfaceFormat::setStencilBufferSize(int size)
466{
467 if (d->stencilSize != size) {
468 detach();
469 d->stencilSize = size;
470 }
471}
472
473/*!
474 Returns the stencil buffer size in bits.
475
476 \sa setStencilBufferSize()
477*/
478int QSurfaceFormat::stencilBufferSize() const
479{
480 return d->stencilSize;
481}
482
483/*!
484 Get the size in bits of the red channel of the color buffer.
485*/
486int QSurfaceFormat::redBufferSize() const
487{
488 return d->redBufferSize;
489}
490
491/*!
492 Get the size in bits of the green channel of the color buffer.
493*/
494int QSurfaceFormat::greenBufferSize() const
495{
496 return d->greenBufferSize;
497}
498
499/*!
500 Get the size in bits of the blue channel of the color buffer.
501*/
502int QSurfaceFormat::blueBufferSize() const
503{
504 return d->blueBufferSize;
505}
506
507/*!
508 Get the size in bits of the alpha channel of the color buffer.
509*/
510int QSurfaceFormat::alphaBufferSize() const
511{
512 return d->alphaBufferSize;
513}
514
515/*!
516 Set the desired \a size in bits of the red channel of the color buffer.
517*/
518void QSurfaceFormat::setRedBufferSize(int size)
519{
520 if (d->redBufferSize != size) {
521 detach();
522 d->redBufferSize = size;
523 }
524}
525
526/*!
527 Set the desired \a size in bits of the green channel of the color buffer.
528*/
529void QSurfaceFormat::setGreenBufferSize(int size)
530{
531 if (d->greenBufferSize != size) {
532 detach();
533 d->greenBufferSize = size;
534 }
535}
536
537/*!
538 Set the desired \a size in bits of the blue channel of the color buffer.
539*/
540void QSurfaceFormat::setBlueBufferSize(int size)
541{
542 if (d->blueBufferSize != size) {
543 detach();
544 d->blueBufferSize = size;
545 }
546}
547
548/*!
549 Set the desired \a size in bits of the alpha channel of the color buffer.
550*/
551void QSurfaceFormat::setAlphaBufferSize(int size)
552{
553 if (d->alphaBufferSize != size) {
554 detach();
555 d->alphaBufferSize = size;
556 }
557}
558
559/*!
560 Sets the color component \a type.
561
562 The default is FixedColorComponentType. To request a floating-point color
563 buffer, set FloatColorComponentType. The red, green, and blue buffer sizes
564 should then be set either to \c 16 or \c 32, to specify either half
565 (16-bit) floating point components or 32-bit. The most commonly supported
566 and used choice is the former (16-bit), for example when high dynamic range
567 rendering is desired.
568
569 \since 6.11
570
571 \sa colorComponentType()
572*/
573void QSurfaceFormat::setColorComponentType(ColorComponentType type)
574{
575 if (d->colorComponentType != type) {
576 detach();
577 d->colorComponentType = type;
578 }
579}
580
581/*!
582 \return the color component type.
583
584 \since 6.11
585
586 \sa setColorComponentType()
587*/
588QSurfaceFormat::ColorComponentType QSurfaceFormat::colorComponentType() const
589{
590 return d->colorComponentType;
591}
592
593/*!
594 Sets the desired renderable \a type.
595
596 Chooses between desktop OpenGL, OpenGL ES, and OpenVG.
597*/
598void QSurfaceFormat::setRenderableType(RenderableType type)
599{
600 if (d->renderableType != type) {
601 detach();
602 d->renderableType = type;
603 }
604}
605
606/*!
607 Gets the renderable type.
608
609 Chooses between desktop OpenGL, OpenGL ES, and OpenVG.
610*/
611QSurfaceFormat::RenderableType QSurfaceFormat::renderableType() const
612{
613 return d->renderableType;
614}
615
616/*!
617 Sets the desired OpenGL context \a profile.
618
619 This setting is ignored if the requested OpenGL version is
620 less than 3.2.
621*/
622void QSurfaceFormat::setProfile(OpenGLContextProfile profile)
623{
624 if (d->profile != profile) {
625 detach();
626 d->profile = profile;
627 }
628}
629
630/*!
631 Get the configured OpenGL context profile.
632
633 This setting is ignored if the requested OpenGL version is
634 less than 3.2.
635*/
636QSurfaceFormat::OpenGLContextProfile QSurfaceFormat::profile() const
637{
638 return d->profile;
639}
640
641/*!
642 Sets the desired \a major OpenGL version.
643*/
644void QSurfaceFormat::setMajorVersion(int major)
645{
646 if (d->major != major) {
647 detach();
648 d->major = major;
649 }
650}
651
652/*!
653 Returns the major OpenGL version.
654
655 The default version is 2.0.
656*/
657int QSurfaceFormat::majorVersion() const
658{
659 return d->major;
660}
661
662/*!
663 Sets the desired \a minor OpenGL version.
664
665 The default version is 2.0.
666*/
667void QSurfaceFormat::setMinorVersion(int minor)
668{
669 if (d->minor != minor) {
670 detach();
671 d->minor = minor;
672 }
673}
674
675/*!
676 Returns the minor OpenGL version.
677*/
678int QSurfaceFormat::minorVersion() const
679{
680 return d->minor;
681}
682
683/*!
684 Returns a std::pair<int, int> representing the OpenGL version.
685
686 Useful for version checks, for example format.version() >= std::pair(3, 2)
687*/
688std::pair<int, int> QSurfaceFormat::version() const
689{
690 return std::pair(d->major, d->minor);
691}
692
693/*!
694 Sets the desired \a major and \a minor OpenGL versions.
695
696 The default version is 2.0.
697*/
698void QSurfaceFormat::setVersion(int major, int minor)
699{
700 if (d->minor != minor || d->major != major) {
701 detach();
702 d->minor = minor;
703 d->major = major;
704 }
705}
706
707/*!
708 Sets the preferred swap interval. The swap interval specifies the
709 minimum number of video frames that are displayed before a buffer
710 swap occurs. This can be used to sync the GL drawing into a window
711 to the vertical refresh of the screen.
712
713 Setting an \a interval value of 0 will turn the vertical refresh
714 syncing off, any value higher than 0 will turn the vertical
715 syncing on. Setting \a interval to a higher value, for example 10,
716 results in having 10 vertical retraces between every buffer swap.
717
718 The default interval is 1.
719
720 Changing the swap interval may not be supported by the underlying
721 platform. In this case, the request will be silently ignored.
722
723 \since 5.3
724
725 \sa swapInterval()
726 */
727void QSurfaceFormat::setSwapInterval(int interval)
728{
729 if (d->swapInterval != interval) {
730 detach();
731 d->swapInterval = interval;
732 }
733}
734
735/*!
736 Returns the swap interval.
737
738 \since 5.3
739
740 \sa setSwapInterval()
741*/
742int QSurfaceFormat::swapInterval() const
743{
744 return d->swapInterval;
745}
746
747/*!
748 Sets the preferred \a colorSpace.
749
750 For example, this allows requesting windows with default framebuffers that
751 are sRGB-capable on platforms that support it.
752
753 \note When the requested color space is not supported by the platform, the
754 request is ignored. Query the QSurfaceFormat after window creation to verify
755 if the color space request could be honored or not.
756
757 \note This setting controls if the default framebuffer of the window is
758 capable of updates and blending in a given color space. It does not change
759 applications' output by itself. The applications' rendering code will still
760 have to opt in via the appropriate OpenGL calls to enable updates and
761 blending to be performed in the given color space instead of using the
762 standard linear operations.
763
764 \since 6.0
765
766 \sa colorSpace()
767 */
768void QSurfaceFormat::setColorSpace(const QColorSpace &colorSpace)
769{
770 if (d->colorSpace != colorSpace) {
771 detach();
772 d->colorSpace = colorSpace;
773 }
774}
775
776#if QT_DEPRECATED_SINCE(6, 0)
777/*!
778 \overload
779 \deprecated [6.0] Use setColorSpace(QColorSpace) instead.
780
781 Sets the colorspace to one of the predefined values.
782
783 \since 5.10
784
785 \sa colorSpace()
786 */
787void QSurfaceFormat::setColorSpace(ColorSpace colorSpace)
788{
789 switch (colorSpace) {
790 case DefaultColorSpace:
791 setColorSpace(QColorSpace());
792 break;
793 case sRGBColorSpace:
794 setColorSpace(QColorSpace::SRgb);
795 break;
796 }
797}
798#endif // QT_DEPRECATED_SINCE(6, 0)
799
800/*!
801 \return the color space.
802
803 \since 5.10
804
805 \sa setColorSpace()
806*/
807const QColorSpace &QSurfaceFormat::colorSpace() const
808{
809 return d->colorSpace;
810}
811
812Q_GLOBAL_STATIC(QSurfaceFormat, qt_default_surface_format)
813
814/*!
815 Sets the global default surface \a format.
816
817 This format is used by default in QOpenGLContext, QWindow, QOpenGLWidget and
818 similar classes.
819
820 It can always be overridden on a per-instance basis by using the class in
821 question's own setFormat() function. However, it is often more convenient to
822 set the format for all windows once at the start of the application. It also
823 guarantees proper behavior in cases where shared contexts are required,
824 because setting the format via this function guarantees that all contexts
825 and surfaces, even the ones created internally by Qt, will use the same
826 format.
827
828 \since 5.4
829 \sa defaultFormat()
830 */
831void QSurfaceFormat::setDefaultFormat(const QSurfaceFormat &format)
832{
833#ifndef QT_NO_OPENGL
834 if (qApp) {
835 QOpenGLContext *globalContext = qt_gl_global_share_context();
836 if (globalContext && globalContext->isValid()) {
837 qWarning("Warning: Setting a new default format with a different version or profile "
838 "after the global shared context is created may cause issues with context "
839 "sharing.");
840 }
841 }
842#endif
843 *qt_default_surface_format() = format;
844}
845
846/*!
847 Returns the global default surface format.
848
849 When setDefaultFormat() is not called, this is a default-constructed QSurfaceFormat.
850
851 \since 5.4
852 \sa setDefaultFormat()
853 */
854QSurfaceFormat QSurfaceFormat::defaultFormat()
855{
856 return *qt_default_surface_format();
857}
858
859/*!
860 \fn bool QSurfaceFormat::operator==(const QSurfaceFormat& lhs, const QSurfaceFormat& rhs)
861
862 Returns \c true if all the options of the two QSurfaceFormat objects
863 \a lhs and \a rhs are equal.
864*/
865
866/*!
867 \fn bool QSurfaceFormat::operator!=(const QSurfaceFormat& lhs, const QSurfaceFormat& rhs)
868
869 Returns \c false if all the options of the two QSurfaceFormat objects
870 \a lhs and \a rhs are equal; otherwise returns \c true.
871*/
872
873/*!
874 \internal
875*/
876bool QSurfaceFormat::equals(const QSurfaceFormat& other) const noexcept
877{
878 return (d == other.d) || ((int) d->opts == (int) other.d->opts
879 && d->stencilSize == other.d->stencilSize
880 && d->redBufferSize == other.d->redBufferSize
881 && d->greenBufferSize == other.d->greenBufferSize
882 && d->blueBufferSize == other.d->blueBufferSize
883 && d->alphaBufferSize == other.d->alphaBufferSize
884 && d->depthSize == other.d->depthSize
885 && d->numSamples == other.d->numSamples
886 && d->swapBehavior == other.d->swapBehavior
887 && d->profile == other.d->profile
888 && d->major == other.d->major
889 && d->minor == other.d->minor
890 && d->swapInterval == other.d->swapInterval);
891}
892
893#ifndef QT_NO_DEBUG_STREAM
894QDebug operator<<(QDebug dbg, const QSurfaceFormat &f)
895{
896 const QSurfaceFormatPrivate * const d = f.d;
897 QDebugStateSaver saver(dbg);
898
899 dbg.nospace() << "QSurfaceFormat("
900 << "version " << d->major << '.' << d->minor
901 << ", options " << d->opts
902 << ", depthBufferSize " << d->depthSize
903 << ", redBufferSize " << d->redBufferSize
904 << ", greenBufferSize " << d->greenBufferSize
905 << ", blueBufferSize " << d->blueBufferSize
906 << ", alphaBufferSize " << d->alphaBufferSize
907 << ", stencilBufferSize " << d->stencilSize
908 << ", samples " << d->numSamples
909 << ", swapBehavior " << d->swapBehavior
910 << ", swapInterval " << d->swapInterval
911 << ", colorSpace " << d->colorSpace
912 << ", profile " << d->profile
913 << ')';
914
915 return dbg;
916}
917#endif
918
919QT_END_NAMESPACE
920
921#include "moc_qsurfaceformat.cpp"
QSurfaceFormatPrivate(QSurfaceFormat::FormatOptions _opts={ })
QSurfaceFormatPrivate(const QSurfaceFormatPrivate *other)
Q_GLOBAL_STATIC(DefaultRoleNames, qDefaultRoleNames, { { Qt::DisplayRole, "display" }, { Qt::DecorationRole, "decoration" }, { Qt::EditRole, "edit" }, { Qt::ToolTipRole, "toolTip" }, { Qt::StatusTipRole, "statusTip" }, { Qt::WhatsThisRole, "whatsThis" }, }) const QHash< int
QDebug operator<<(QDebug dbg, const QFileInfo &fi)