Hi! I am new in Allegro5 world
So... I am using arch linux, codeblocks and allegro5 and when i want to use al_get_backbuffer it does nothing ... but if I use it as argument of al_draw_scaled_bitmap it draws white square... so ?
Any ideas ? 
bckbuffer = al_get_backbuffer(display);
al_draw_scaled_bitmap(bckbuffer,100, 100, 50, 50, 700, 50, 100, 100, 0);
This is waht it does
{"name":"608808","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/a\/6\/a6deb644c8210a5f696ffbe1808448c8.png","w":1600,"h":900,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/a\/6\/a6deb644c8210a5f696ffbe1808448c8"}
Thanks for help
I am not sure drawing from the backbuffer to the backbuffer is a valid thing?
OK i did this and it works
Ty for help
Is there a reason you want to draw from the backbuffer? Was this just a test to play around? Normally there isn't a good reason to read back from the backbuffer.
I did this because i want easy way to capture something displayed on display and display it elsewhere
{"name":"608812","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/3\/f\/3f8e3702e08139cf1c51b46687895e79.png","w":1600,"h":900,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/3\/f\/3f8e3702e08139cf1c51b46687895e79"}
Ah, I see. You can just re-draw stuff in other locations. Allegro 5 is hardware accelerated, and its often better to just re-draw rather than read back from the display as that can be very slow.
Using the backbuffer as the source is supported (with some restrictions), but it isn't the reason why this bug happens.
The real reason is that Allegro doesn't support drawing any bitmap to itself, so what you could do is draw the section you want into a separate bitmap, and then draw that bitmap somewhere. This will be more efficient than cloning the backbuffer each frame.
I suggest using the debug build of Allegro while developing, as some of these things are only enforced then.
I haven't found any other functional solution... 
I used this technique for something more complex...
And it works fine
no lags or tearing 
(It is a program for fun
)