glXCreateWindow在VISUAL_ID和屏幕>root_visual不相等时不起作用
glXCreateWindow doesn't work when VISUAL_ID and screen->root_visual aren't equal
我正在处理与此非常相似的代码:
http://xcb.freedesktop.org/opengl/
当我使用默认的帧缓冲配置时,它工作正常,尽管当我尝试查询某个配置时它会失败。我已经确定只要VISUAL_ID
(在示例代码中visualID
)和screen->root_visual
是不同的值,它就会失败。
以下是错误消息:
X Error of failed request: BadWindow (invalid Window parameter)
Major opcode of failed request: 135 (GLX)
Minor opcode of failed request: 31 (X_GLXCreateWindow)
Resource id in failed request: 0x1600003
Serial number of failed request: 32
Current serial number in output stream: 34
我该怎么做才能解决这个问题?
最有可能的事件是xcb_create_window()
调用失败(使用 xcb_create_window_checked()
和 xcb_request_check()
进行验证)。它失败,因为COPY_FROM_PARENT
被指定为深度,这与所需的视觉深度不匹配。
应查询正在使用的视觉对象的深度,并将其xcb_create_window()
。
更新 如果创建的窗口的深度与其父窗口不同,则必须指定边框像素,可能还需要指定背景像素和颜色图,例如,请参阅此问题。
相关文章:
- Visual Studio 2015:Extern "C" 和 "export" 关键字
- 为cl.exe(Visual Studio代码)指定命令行C++版本
- 试图在visual studio上用C++创建一个桌面应用程序
- 如何在MS Visual Studio 2019中运行QT UI
- 如何使用Visual Studio 2017在C++中为参数化对象数组使用唯一指针
- Visual Studio Code - C++ Debugger 無法啟動
- Visual C++ constexpr Hints
- 为什么它不适用于Visual 2019的原因
- Visual Studio 2019:插入多个C++风格的单行注释
- Visual Studio Code "undefined reference to `WinMain@16'"
- visual在c++中将十进制数转换为二进制数
- Visual studio代码重构似乎不起作用(例如,重命名符号-f2)
- Visual Studio中的函数声明和函数定义问题
- 如何指定我希望我的LIB链接到的DLL文件?-Visual Studio 2019
- Visual C++(VS2017)中用户定义的转换不明确
- Visual C++GC接口如何启用它以及要包含哪个库
- visual是否可以在c++中创建一个接收无限数量相同类型(或至少相当数量)参数的函数
- visual c++,如何获取解决方案目录中的代码
- Visual Studio mkl_link_tool.exe链接错误
- Visual Studio(或任何其他工具)能否将地址解释为调用堆栈(boost上下文)的开头