Having problems with daul screen A5, VC2010, Windows xp..
After setup both screens show image but the FPS is very slow..
Single screen no problem.
What am i missing or doing wrong.
Settings
G/F Card Readon 300 series
Screens 1&2 1280x768
Image size 1024X768
Thanks
Are you using the same bitmaps (sprites) on both displays?
Unless you set the ALLEGRO_MEMORY_BITMAP flag, the bitmap is created for the current display. Blitting to another display may be slow
You may need to load your bitmaps as video bitmaps on both displays if this is the case.
Ashteth.
Thanks for a quick reply ,
I am using the same image for both screens.
will test this evening with ALLEGRO_MEMORY_BITMAP flag.
Thanks
will test this evening with ALLEGRO_MEMORY_BITMAP flag.
That's not what Asteth meant. What he meant is this:
I.e. you need to duplicate all your images that you want to blit on both displays using al_clone_bitmap. Note how I clone the bitmap after creating the second display ( al_create_display calls al_set_target_backbuffer on the newly created display).
Also, those al_get_new_display_adapter calls are unnecessary, and you only need to call al_set_new_display_adapter when creating displays, not drawing to them.
Thanks
For pointing out my misunderstanding..
After changeing the code i got an empty window on each screen
and the program hung.Looking at the code this morning notice that
the image was loaded before the al_init_image_addon() was called
which point to the problem.
I did try the orignal code with two diffrent images both display's
showed the image but FPS was very slow..
The Orignal Code.
When loading images for the second display, you have to change that display to the current display, otherwise both bitmaps will be attached to the display that was created last.
So, when loading for the first display make sure you call set_target_backbuffer(display1);
easiest is to probably load for display2 first, then set the target backbuffer to display1 and load all the images for that. And now the current display is display1 as you'd probably expect.
Thanks to
Ashteth,SiegeLord,Thomas for there advice..
was a great help all is working well..
What am i missing or doing wrong.
Dual screen.