本文整理汇总了C++中QPlatformWindowFormat::setSwapInterval方法的典型用法代码示例。如果您正苦于以下问题:C++ QPlatformWindowFormat::setSwapInterval方法的具体用法?C++ QPlatformWindowFormat::setSwapInterval怎么用?C++ QPlatformWindowFormat::setSwapInterval使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QPlatformWindowFormat
的用法示例。
在下文中一共展示了QPlatformWindowFormat::setSwapInterval方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: toPlatformWindowFormat
/*!
\since 4.8
Returns a platform window format for the OpenGL format specified by \a format.
*/
QPlatformWindowFormat QGLFormat::toPlatformWindowFormat(const QGLFormat &format)
{
QPlatformWindowFormat retFormat;
retFormat.setAccum(format.accum());
if (format.accumBufferSize() >= 0)
retFormat.setAccumBufferSize(format.accumBufferSize());
retFormat.setAlpha(format.alpha());
if (format.alphaBufferSize() >= 0)
retFormat.setAlphaBufferSize(format.alphaBufferSize());
if (format.blueBufferSize() >= 0)
retFormat.setBlueBufferSize(format.blueBufferSize());
retFormat.setDepth(format.depth());
if (format.depthBufferSize() >= 0)
retFormat.setDepthBufferSize(format.depthBufferSize());
retFormat.setDirectRendering(format.directRendering());
retFormat.setDoubleBuffer(format.doubleBuffer());
if (format.greenBufferSize() >= 0)
retFormat.setGreenBufferSize(format.greenBufferSize());
if (format.redBufferSize() >= 0)
retFormat.setRedBufferSize(format.redBufferSize());
retFormat.setRgba(format.rgba());
retFormat.setSampleBuffers(format.sampleBuffers());
if (format.samples() >= 0)
retFormat.setSamples(format.samples());
retFormat.setStencil(format.stencil());
if (format.stencilBufferSize() >= 0)
retFormat.setStencilBufferSize(format.stencilBufferSize());
retFormat.setStereo(format.stereo());
retFormat.setSwapInterval(format.swapInterval());
return retFormat;
}