I'm getting very bad performance on my Asus EEE PC 1101HA with Allegro 5.0.5. The only thing I do is draw a single bitmap on screen. Basically, my code looks like this (not the exact code, may contain misspellings or insignificant errors):
al_set_new_bitmap_flags( ALLEGRO_MIPMAP );
al_set_new_display_flags( ALLEGRO_WINDOWED | ALLEGRO_DIRECT3D );
ALLEGRO_DISPLAY *display = al_create_display( 800, 600 );
ALLEGRO_BITMAP *bmp = al_load_bitmap( "bitmap.png" );
while( true )
// Some code to count FPS...
al_draw_scaled_bitmap( bmp, 0, 0, 700, 500, 0, 0, 800, 600, 0 );
I'm getting about 4FPS with that code. While I understand that Intel GMA 500 isn't very good video card, I believe that my old P233 with S3 video card could have handled this task with a lot more FPS...
So, I profiled the code with some external profilers, and got this results: running program takes 100% of CPU time (not surprising, since there is no call to al_rest or sleep), and the function that takes all the time is this:
which calls this:
After reading the source for Allegro functions, I found out that they implement software blending (despite having a promising "shader" in name ). The same code runs at about 5000FPS on my main development rig (Core i7), so it seems that Asus puny CPU just can't handle all those blendings. But here lies a problem: I do not, in fact, do any blending in that case! I understand that Allegro calls blending function anyway, but... It leads to horrible performance.
So, I seek an advice. Should I:
1) Change my code somehow to get better performance when blending is not involved (then again, I'll need blending later, so it's not a very good option)
2) Tap my pool of available graphic software expertise (while I don't do low-level graphic programming, some of my colleagues do) and optimize/rewrite Allegro blending like a hero
3) Wait for main Allegro developers to do 2) Or just update to the latest SVN build, if that problem is solved by it already.
4) Just bump up system requirement to exclude low-end netbooks