【问题标题】:Qt OpenGL framebuffer creates at one PC, but fails at anotherQt OpenGL 帧缓冲区在一台 PC 上创建,但在另一台 PC 上失败
【发布时间】: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 支持团队了解更多信息。`我不知道是什么问题导致了它。有什么建议吗?

标签: c++ qt opengl


【解决方案1】:

问题如下:我一直在使用 Microsoft Windows RDP。通过它无法正常启动 Qt OpenGL 应用程序。看来微软或 Digia 搞砸了!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-10-31
    • 1970-01-01
    • 2023-02-10
    • 1970-01-01
    相关资源
    最近更新 更多