【发布时间】:2015-07-31 12:41:14
【问题描述】:
我正在 Cygwin/X 中运行一个带有 glew 和 freeglut 的演示程序。程序请求 OpenGL 3.3。我收到了这个错误:
X Error of failed request: GLXBadFBConfig
Major opcode of failed request: 149 (GLX)
Minor opcode of failed request: 34 ()
Serial number of failed request: 386
Current serial number in output stream: 385
导出LIBGL_DEBUG=verbose时,返回如下:
libGL: enabled GLX_SGI_make_current_read
libGL: enabled GLX_SGI_swap_control
libGL: enabled GLX_MESA_swap_control
libGL: enabled GLX_SGIX_pbuffer
libGL: enabled GLX_ARB_multisample
libGL: enabled GLX_SGIS_multisample
libGL: enabled GLX_ARB_create_context
libGL: enabled GLX_ARB_create_context_profile
libGL: enabled GLX_MESA_copy_sub_buffer
X Error of failed request: GLXBadFBConfig
Major opcode of failed request: 149 (GLX)
Minor opcode of failed request: 34 ()
Serial number of failed request: 386
Current serial number in output stream: 385
我在一个 Xterm 中运行程序,它是随环境启动的
export LIBGL_USE_WGL=1
glewinfo | grep OpenGL 返回如下:
OpenGL version 4.5.13397 Compatibility Profile Context 15.200.1046.0 is supported
但如果我使用 Mesa,它只支持 OpenGL 3.0。
我使用指定 OpenGL 版本
glutInitContexVersion(3, 3)
,GLSL着色器中的版本字符串为
#version 330
我已经升级了 Windows 中安装的所有驱动程序。
该程序在提供here 的 SDK 下运行良好,没有 glew,它使用 SDK 加载 OpenGL 函数。但我希望它在没有 SDK 的情况下运行,所以我使用 glew。
我想在 Windows 中运行这个程序,所以我想继续使用 Cygwin/X。我是否必须安装一些额外的 Cygwin 软件包或使用一些额外的参数配置 Cygwin/X?
【问题讨论】:
-
你有英特尔 GPU 吗?我在带有 HD5500 的 i5 上的 10.5 Mesa 在兼容性配置文件中不支持 OpenGL 3.3,仅支持核心。您是否尝试过添加 glutIntContextProfile(GLUT_CORE_PROFILE)?
-
@HughFisher 不,我使用 AMD Radeon HD 7660G。而且我已经指定了一个核心配置文件。