MCPcopy Create free account
hub / github.com/KDAB/GammaRay / surfaceFormatToString

Function surfaceFormatToString

plugins/guisupport/guisupport.cpp:575–613  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

573}
574
575static QString surfaceFormatToString(const QSurfaceFormat &format)
576{
577 QString s;
578 switch (format.renderableType()) {
579 case QSurfaceFormat::DefaultRenderableType:
580 s += QStringLiteral("Default");
581 break;
582 case QSurfaceFormat::OpenGL:
583 s += QStringLiteral("OpenGL");
584 break;
585 case QSurfaceFormat::OpenGLES:
586 s += QStringLiteral("OpenGL ES");
587 break;
588 case QSurfaceFormat::OpenVG:
589 s += QStringLiteral("OpenVG");
590 break;
591 }
592
593 s += " (" + QString::number(format.majorVersion())
594 + '.' + QString::number(format.minorVersion());
595 switch (format.profile()) {
596 case QSurfaceFormat::CoreProfile:
597 s += QStringLiteral(" core");
598 break;
599 case QSurfaceFormat::CompatibilityProfile:
600 s += QStringLiteral(" compat");
601 break;
602 case QSurfaceFormat::NoProfile:
603 break;
604 }
605 s += ')';
606
607 s += " RGBA: " + QString::number(format.redBufferSize())
608 + '/' + QString::number(format.greenBufferSize())
609 + '/' + QString::number(format.blueBufferSize())
610 + '/' + QString::number(format.alphaBufferSize());
611
612 return s;
613}
614
615#define E(x) \
616 { \

Callers

nothing calls this directly

Calls 1

profileMethod · 0.80

Tested by

no test coverage detected