【发布时间】:2017-11-01 08:05:49
【问题描述】:
所以,有两台电脑装有 Windows 8.1 x64。首先安装了 Qt 5.7 SDK,其次没有。 在第一台 PC 上,以下 C++ Qt5 代码成功运行:
int big_width = 1392;
int big_height = 1040;
int small_width = 696;
int small_height = 520;
format.setSamples(4);
format.setAttachment(QGLFramebufferObject::Depth);
framebuffer_big = new QGLFramebufferObject(big_width, big_height, format);
framebuffer_small = new QGLFramebufferObject(small_width, small_height, format);
在第二台 PC 上,我正在 Windows 控制台中观看以下内容:
[qglframebufferobject.cpp line 549] GL Error: 1280
QGLFramebufferObject: Framebuffer incomplete attachment.
QGLFramebufferObject: Framebuffer incomplete attachment.
QGLFramebufferObject: Framebuffer incomplete attachment.
[qglframebufferobject.cpp line 549] GL Error: 1280
QGLFramebufferObject: Framebuffer incomplete attachment.
QGLFramebufferObject: Framebuffer incomplete attachment.
QGLFramebufferObject: Framebuffer incomplete attachment.
所以,我在第二台电脑上升级了视频驱动程序,但没有效果。当然,还提供了一些必需的 dll。
问题是:如何在第二台 PC 上修复上述错误?
【问题讨论】:
-
尝试显示您在这两种情况下使用的 openglVersion。在第二个中,如果您还添加了 colorAttachment
-
@DraykoonD 我在两台电脑上都试过
qDebug()<<QString::fromStdString( std::string(reinterpret_cast<const char*>( glGetString(GL_VERSION) )) );。起初我得到"4.5.0 NVIDIA 365.19"。在第二台 PC 上,该程序遭遇了厄运:termiante after throwing an instance of 'std::logic_error' what(): basic_string::_M_construct null not valid This application has requested the Runtime it in unusual way. Please contact the applications 支持团队了解更多信息。`我不知道是什么问题导致了它。有什么建议吗?