|
This thread is locked; no one can reply to it. |
1
2
|
fast put_pixels(again) or al_load_bitmap(void* data) |
kazzmir
Member #1,786
December 2001
|
Can you upload the datafile somewhere? Your claim is that just reading the file and using allegro5 to load the individual sprites takes a long time which should be easy to verify with a small program. |
aniquilator
Member #9,841
May 2008
|
If you are in linux, you can get the test here: |
kazzmir
Member #1,786
December 2001
|
$ ./teste ./teste: error while loading shared libraries: libaudiere-1.9.4.so: cannot open shared object file: No such file or directory Anyway statically linking your program will not let me debug it. Can you not provide the source? |
Matthew Leverton
Supreme Loser
January 1999
|
aniquilator said: Is There some "ident" I can pass, so it will try to load until it reaches the correct format? Allegro has no image detection. It only loads exactly what you tell it to via the extension of the filename or the ident parameter. |
kazzmir
Member #1,786
December 2001
|
Matthew Leverton said: Allegro has no image detection. Although maybe it could. bool al_is_image_png(ALLEGRO_FILE * file); etc? |
Matthew Leverton
Supreme Loser
January 1999
|
Or it could be something like const char *al_detect_image_format(ALLEGRO_FILE *f); that returns some global const char string. The problem (limitation) with such a thing is that the file stream would have to be seekable in order for it to be useful. So Allegro couldn't automatically just try that. And speaking of which, it would be useful if Allegro's file interfaces could be queries to see whether or not they were seekable. |
Thomas Fjellstrom
Member #476
June 2000
|
Yes, I think a flag or function of some sort to check would be useful. -- |
aniquilator
Member #9,841
May 2008
|
So, I've downloaded your game, paintown, and compiled it with allegro5. I think the problem is with my pc... |
Thomas Fjellstrom
Member #476
June 2000
|
If your netbook is really slow, yeah, it'll take forever to decompress the images and upload them to the gfx card. Especially if the flash drive in it is really slow (some are). -- |
aniquilator
Member #9,841
May 2008
|
The strange thing is that, when I'm using allegro4 or SDL, it runs faster. Crazyness. |
Thomas Fjellstrom
Member #476
June 2000
|
Yeah, so your netbook likely has a VERY slow GPU. But a decent CPU. So it can do software some rendering faster than gpu rendering. -- |
kazzmir
Member #1,786
December 2001
|
If you just run paintown normally it will use memory bitmaps to load all sff files because they are loaded in a separate thread where there is no ALLEGRO_DISPLAY set. All processing should happen on the CPU just as with Allegro4/SDL so the only added time is uploading them to the GPU. Can you try building the tests and just loading kfm by himself? $ make test $ build-allegro5/test/mugen/load After you run the test twice (to make sure the cache is full) I see [0:test] Success! Took 1.885 seconds Some of the tests currently fail, just ignore those. |
aniquilator
Member #9,841
May 2008
|
Kazzmir, I couldnt compile your test using allegro 5, what is the parameter for that? But now I'm really shocked. Crazy stuff. kkkk |
kazzmir
Member #1,786
December 2001
|
aniquilator said: Kazzmir, I couldnt compile your test using allegro 5, what is the parameter for that? Well can you say why you couldn't compile exactly? $ export ALLEGRO5=1 $ make test I left out the 'export ALLEGRO5=1' because you claimed you had compiled paintown with allegro5 already so I thought you figured out to set ALLEGRO5 yourself. If you don't set ALLEGRO5 you will get an SDL implementation. Quote: I put my program to load every thing using memory bitmaps, and them I convert every sprite to video_bitmaps.. and guess what? A lot faster than load everything in video_bitmaps. I think theres some information you are leaving out. It would be nice to see your source. |
|
1
2
|