|
Sending a memory bitmap over internet |
pekka keke
Member #14,559
September 2012
|
I was wondering how this would be done? Should the bitmap be serialized or how would you be able to send it just like any other information? The network commands are no problem, just the method of sending the bitmap. |
Trent Gamblin
Member #261
April 2000
|
lock it with al_lock_bitmap, send it with the width and height byte by byte respecting the pitch then al_unlock_bitmap it.
|
Arthur Kalliokoski
Second in Command
February 2005
|
Lossless = png file They all watch too much MSNBC... they get ideas. |
pekka keke
Member #14,559
September 2012
|
I tried a huge for loop to check the bitmap and send it that way, well it worked but i wonder how can you give process time for other actions also? Right now the game jams for a few seconds. I tried Sleep() but it just jammed it completely. And i wonder what Arthur was trying to say. |
Trent Gamblin
Member #261
April 2000
|
Arthur was saying, saving the bitmap with al_save_bitmap and send that file. If you want the process to not "jam" then use al_create_thread or al_run_detached_thread. EDIT: Arthur's idea is good if you can possibly do that.
|
|