Allegro5 - openGL:失败请求的主要操作码:55(X_CreateGC)
我一直在尝试在我的 Ubuntu 机器上启动并运行 Allegro5。我编译了这段代码:
#include <stdio.h>
#include <allegro5/allegro.h>
int main(int argc, char **argv)
{
ALLEGRO_DISPLAY *display = NULL;
if (!al_init()) {
fprintf(stderr, "failed to initialize allegro!\n");
return -1;
}
display = al_create_display(640, 480);
if (!display) {
fprintf(stderr, "failed to create display!\n");
return -1;
}
al_clear_to_color(al_map_rgb(0,0,0));
al_flip_display();
al_rest(10.0);
al_destroy_display(display);
return 0;
}
收到此错误:
X Error of failed request: BadDrawable (invalid Pixmap or Window parameter)
Major opcode of failed request: 55 (X_CreateGC)
Resource id in failed request: 0x4000002
Serial number of failed request: 25
Current serial number in output stream: 27
尝试了此解决方案: http://www.allegro.cc/forums/thread/607530 (将 allegro5.cfg 更改为“config_selection=old”并安装 mesa-utils)。
我不知道现在该尝试什么。
I have been trying to get Allegro5 up and running on my Ubuntu machine. I compiled this code:
#include <stdio.h>
#include <allegro5/allegro.h>
int main(int argc, char **argv)
{
ALLEGRO_DISPLAY *display = NULL;
if (!al_init()) {
fprintf(stderr, "failed to initialize allegro!\n");
return -1;
}
display = al_create_display(640, 480);
if (!display) {
fprintf(stderr, "failed to create display!\n");
return -1;
}
al_clear_to_color(al_map_rgb(0,0,0));
al_flip_display();
al_rest(10.0);
al_destroy_display(display);
return 0;
}
Received this error:
X Error of failed request: BadDrawable (invalid Pixmap or Window parameter)
Major opcode of failed request: 55 (X_CreateGC)
Resource id in failed request: 0x4000002
Serial number of failed request: 25
Current serial number in output stream: 27
Tried this solution:
http://www.allegro.cc/forums/thread/607530
(changed allegro5.cfg to be "config_selection=old" and installed mesa-utils).
I am not sure what to try now.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
配置 xorg.conf 以使用 dri 和 glx。
Configured xorg.conf to use dri and glx.