LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   allegro on embedded linux (https://www.linuxquestions.org/questions/programming-9/allegro-on-embedded-linux-739143/)

mostafa 07-10-2009 06:38 AM

allegro on embedded linux
 
Hello all,
I am created a embedded linux and i have installed driver of my grapgic card that is base on linux framebuffer (sisfb). the node /dev/fb0 is exists and The driver work well with other programs such as DirectFB but when i want to run an allegro sample the message is "can not find any graphics driver". I have compiled allegro with framebuffer enabled configuration and i have choosed GFX_FBCON at gfx_init.
For example,I have write this program:

//------------------------------------------------------
#include <stdio.h>
#include <allegro.h>
int main(int argc,char* argv[])
{
//-------------initial allegro------------------
if (allegro_init() != 0)
{
printf("can not initialize allegro.\r\n");
exit(0);
}

set_color_depth(16);

if (set_gfx_mode(GFX_AUTODETECT, 1024, 768, 0, 0) != 0)
{
printf("%s\n",allegro_error);
exit(0);
}
allegro_exit();

return 0;
}
END_OF_MAIN()
//-------------------------


and when i compile and run it this message is appeared:

"Unable to find a suitable graphics driver"

in addition when i want to run setup or gfxinfo programs of allegro this message is also appeared.

The log file of allegro is as follow:

al-unix INFO: Assumed libc encoding is unknown.
al-unix INFO: Assumed libc encoding is unknown.
al-main INFO: Allegro initialised (instance 1)
al-gfx INFO: Called set_gfx_mode(1178738720, 1024, 768, 0, 0).
al-gfx INFO: First call, remembering console state.
al-gfx ERROR: Failed setting graphic driver 1178738720.
al-gfx INFO: Called set_gfx_mode(1396786757, 320, 200, 0, 0).
al-gfx INFO: Trying to set a safe graphics mode.
al-gfx WARNING: The system driver was unable to get a safe mode, I'll try with the specified parameters...
al-gfx INFO: Autodetecting graphic driver.
al-gfx ERROR: Failed setting graphic driver 0.
al-gfx ERROR: Bad bad, not even GFX_SAFE works?
al-gfx INFO: Closing, restoring original console state.
al-gfx INFO: Graphic mode closed.
al-gfx INFO: Called set_gfx_mode(-1, 0, 0, 0, 0).
al-gfx INFO: Closing, restoring original console state.
al-gfx INFO: Graphic mode close
d.


I don't know what to do?
Please help me.
thank a lot.


All times are GMT -5. The time now is 05:45 AM.