Qt QOPENGLEXTRAFUNCES的成员函数缺失

Qt QOPENGLEXTRAFUNCES的成员函数缺失,qt,opengl,virtualbox,mesa,Qt,Opengl,Virtualbox,Mesa,我正在VirtualBox中运行Ubuntu18.04。一旦我想要构建我的项目,我就会收到这个错误消息 error: ‘class QOpenGLExtraFunctions’ has no member named ‘glTexBuffer’; did you mean ‘glReadBuffer’? MBGL.glTexBuffer(GL_TEXTURE_BUFFER, GL_RGBA32F, m_buildingColorBuffer); 所以我认为OpenGL

我正在VirtualBox中运行Ubuntu18.04。一旦我想要构建我的项目,我就会收到这个错误消息

error: ‘class QOpenGLExtraFunctions’ has no member named ‘glTexBuffer’; did you mean ‘glReadBuffer’?
             MBGL.glTexBuffer(GL_TEXTURE_BUFFER, GL_RGBA32F, m_buildingColorBuffer);
所以我认为OpenGL版本是不正确的。我更新了所有的东西 “glxInfo”给了我这个信息

OpenGL renderer string: llvmpipe (LLVM 6.0, 256 bits)
OpenGL core profile version string: 3.3 (Core Profile) Mesa 18.1.5
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.1 Mesa 18.1.5
OpenGL shading language version string: 1.40
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.0 Mesa 18.1.5
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
这似乎很好,因为3.x支持glTexBuffer


还有什么我可以做的吗?或者是否有glTexBuffer()的替代方案这很有趣:在在线文档中。对于Qt 5.11,提到了:。在我们这边,我们使用Qt5.9.2。所以,我查了一下在线文档。对于Qt 5.9也一样:。它似乎是与Qt5.10一起添加的。根据您的评论,我将我的Qt从5.9.6更新到了5.11,但实际上它没有帮助,文档。只是一个提示(尽管它通常嵌入在源代码中/由源代码生成)。您是否检查了
glTexBuffer()
是否确实出现在Qt头文件中的某个位置?如果找到,您可能会看到它依赖于某些宏/设置…不,它不在那里,我检查了已经^^^根据您的提示,我查看了不同的头文件,发现我需要的函数在#include it now中