开发者

Allegro5 - openGL: Major opcode of failed request: 55 (X_CreateGC)

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.


Configured xorg.conf to use dri and glx.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜