本文整理汇总了C++中QEglProperties::toString方法的典型用法代码示例。如果您正苦于以下问题:C++ QEglProperties::toString方法的具体用法?C++ QEglProperties::toString怎么用?C++ QEglProperties::toString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QEglProperties
的用法示例。
在下文中一共展示了QEglProperties::toString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: reportEGLConfigInfo
QString QGLInfo::reportEGLConfigInfo() const
{
#if !defined(QT_NO_EGL)
QString d;
QEglProperties props;
EGLint count = 0;
EGLDisplay dpy = eglGetCurrentDisplay();
EGLContext ctx = eglGetCurrentContext();
EGLint cfgnum = 0;
if (eglQueryContext(dpy, ctx, EGL_CONFIG_ID, &cfgnum)) {
d += QString("Window configuration in use: ") + QString::number(cfgnum) +
QLatin1String("\n\n");
}
if (!eglGetConfigs(dpy, 0, 0, &count) || count < 1)
return d;
EGLConfig *configs = new EGLConfig [count];
eglGetConfigs(dpy, configs, count, &count);
for (EGLint index = 0; index < count; ++index) {
props = QEglProperties(configs[index]);
d += props.toString() + QLatin1String("\n\n");
}
delete [] configs;
return d;
#else
return QString();
#endif
}
示例2: dumpAllConfigs
// Dump all of the EGL configurations supported by the system.
void QEgl::dumpAllConfigs()
{
QEglProperties props;
EGLint count = 0;
if (!eglGetConfigs(display(), 0, 0, &count) || count < 1)
return;
EGLConfig *configs = new EGLConfig [count];
eglGetConfigs(display(), configs, count, &count);
for (EGLint index = 0; index < count; ++index) {
props = QEglProperties(configs[index]);
qWarning() << props.toString();
}
delete [] configs;
}