- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我已经下载并安装了“Qt 5.2 mingw(opengl 和 x86)”版本。当我用这个版本的 Qt 运行 Qt 项目时,没有问题。但是当我运行 Qt Quick 应用程序时,程序崩溃并且以下消息登录调试:
getProcAddress: Unable to resolve 'glGenRenderbuffers'
getProcAddress: Unable to resolve 'glGenRenderbuffersOES'
getProcAddress: Unable to resolve 'glGenRenderbuffersARB'
getProcAddress: Unable to resolve 'glGenRenderbuffersEXT'
getProcAddress: Unable to resolve 'glBindRenderbuffer'
getProcAddress: Unable to resolve 'glBindRenderbufferOES'
getProcAddress: Unable to resolve 'glBindRenderbufferARB'
getProcAddress: Unable to resolve 'glBindRenderbufferEXT'
getProcAddress: Unable to resolve 'glRenderbufferStorage'
getProcAddress: Unable to resolve 'glRenderbufferStorageOES'
getProcAddress: Unable to resolve 'glRenderbufferStorageARB'
getProcAddress: Unable to resolve 'glRenderbufferStorageEXT'
getProcAddress: Unable to resolve 'glGenRenderbuffers'
getProcAddress: Unable to resolve 'glGenRenderbuffersOES'
getProcAddress: Unable to resolve 'glGenRenderbuffersARB'
getProcAddress: Unable to resolve 'glGenRenderbuffersEXT'
getProcAddress: Unable to resolve 'glBindRenderbuffer'
getProcAddress: Unable to resolve 'glBindRenderbufferOES'
getProcAddress: Unable to resolve 'glBindRenderbufferARB'
getProcAddress: Unable to resolve 'glBindRenderbufferEXT'
getProcAddress: Unable to resolve 'glRenderbufferStorage'
getProcAddress: Unable to resolve 'glRenderbufferStorageOES'
getProcAddress: Unable to resolve 'glRenderbufferStorageARB'
getProcAddress: Unable to resolve 'glRenderbufferStorageEXT'
getProcAddress: Unable to resolve 'glFramebufferRenderbuffer'
getProcAddress: Unable to resolve 'glFramebufferRenderbufferOES'
getProcAddress: Unable to resolve 'glFramebufferRenderbufferARB'
getProcAddress: Unable to resolve 'glFramebufferRenderbufferEXT'
getProcAddress: Unable to resolve 'glFramebufferRenderbuffer'
getProcAddress: Unable to resolve 'glFramebufferRenderbufferOES'
getProcAddress: Unable to resolve 'glFramebufferRenderbufferARB'
getProcAddress: Unable to resolve 'glFramebufferRenderbufferEXT'
getProcAddress: Unable to resolve 'glGenBuffers'
getProcAddress: Unable to resolve 'glGenBuffersOES'
getProcAddress: Unable to resolve 'glGenBuffersARB'
getProcAddress: Unable to resolve 'glGenBuffersEXT'
getProcAddress: Unable to resolve 'glBindBuffer'
getProcAddress: Unable to resolve 'glBindBufferOES'
getProcAddress: Unable to resolve 'glBindBufferARB'
getProcAddress: Unable to resolve 'glBindBufferEXT'
getProcAddress: Unable to resolve 'glBufferData'
getProcAddress: Unable to resolve 'glBufferDataOES'
getProcAddress: Unable to resolve 'glBufferDataARB'
getProcAddress: Unable to resolve 'glBufferDataEXT'
getProcAddress: Unable to resolve 'glBindBuffer'
getProcAddress: Unable to resolve 'glBindBufferOES'
getProcAddress: Unable to resolve 'glBindBufferARB'
getProcAddress: Unable to resolve 'glBindBufferEXT'
getProcAddress: Unable to resolve 'glBindBuffer'
getProcAddress: Unable to resolve 'glBindBufferOES'
getProcAddress: Unable to resolve 'glBindBufferARB'
getProcAddress: Unable to resolve 'glBindBufferEXT'
getProcAddress: Unable to resolve 'glCreateProgram'
getProcAddress: Unable to resolve 'glCreateProgramARB'
getProcAddress: Unable to resolve 'glCreateProgramObject'
getProcAddress: Unable to resolve 'glCreateProgramObjectARB'
QOpenGLShaderProgram: could not create shader program
getProcAddress: Unable to resolve 'glCreateShader'
getProcAddress: Unable to resolve 'glCreateShaderARB'
getProcAddress: Unable to resolve 'glCreateShaderObject'
getProcAddress: Unable to resolve 'glCreateShaderObjectARB'
QOpenGLShader: could not create shader
Renderer failed shader compilation:
""
最佳答案
当您的显卡驱动程序不支持 Qt.Quick 应用程序所必需的 OpenGL 2.0 时,就会发生这种情况。
第一个解决方案是升级您的显卡驱动程序。您也可以使用 OpenGL extensions Viewer验证您支持哪些 OpenGL 版本。
另一方面,如果您希望能够将您的应用程序部署到其他 Windows 安装并且不想要求用户更新他们的驱动程序,那么您不应该使用基于 OpenGL 的 Qt5 构建,而是基于 ANGLE 的构建。遗憾的是,从 Qt 5.1 开始,Qt 团队停止发布带有 ANGLE 和 mingw 的 Qt 版本。所以你要么需要自己重新编译 Qt,要么使用基于另一个编译器的版本。
有关 Qt5 和 Windows 以及 ANGLE/OpenGL 的更多信息,请访问 here
编辑 Qt5.3
上 Qt 5.3
新信号已添加到 QQuickWindow
叫 sceneGraphError这使您可以知道初始化失败,而不仅仅是获得一个空白屏幕。
此外,Qt 团队正在致力于首先在客户端计算机上尝试 OpenGL,如果失败则回退到 ANGLE。这在 Qt 5.3
中仍处于实验阶段并且应该是 Qt 5.4
的一部分释放。
关于qt - 错误 : QOpenGLShader: could not create shader - when compiling QtQuick applications with Qt5. 2 Mingw OpenGL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20530157/
我已经下载并安装了“Qt 5.2 mingw(opengl 和 x86)”版本。当我用这个版本的 Qt 运行 Qt 项目时,没有问题。但是当我运行 Qt Quick 应用程序时,程序崩溃并且以下消息登
我是一名优秀的程序员,十分优秀!