![]() |
|
Allegro 4.9.9 |
brunooo
Member #8,346
February 2007
![]() |
No compression (similar to 4.2 datafiles) on this version? |
Thomas Fjellstrom
Member #476
June 2000
![]() |
brunooo said: No compression (similar to 4.2 datafiles) on this version? Eventually it'll have zip file support. As well as zlib support for compressing entire files. But right now theres no support for anything like allegro4's DATAFILEs. -- |
kenmasters1976
Member #8,794
July 2007
|
I keep trying to learn the new API. Now I'm checking the examples using the IIO addon. I don't know why but all of them run incredibly slow on my machine (due to the bitmap drawing routines, it seems). I tried to change the created display on ex_bitmap and ex_bitmap_flip to use OpenGL to see how fast they run but they both crash on the call to al_draw_bitmap(). I'm using Allegro 4.9.9.1. It seems that the problem is in the creation of display bitmaps when using OpenGL, 'cause if I change the following lines in ex_bitmap: bitmap = al_clone_bitmap(membitmap); if (!bitmap) bitmap = membitmap; to this, the program no longer crashes: bitmap = membitmap; gdb's output for both examples is almost the same: Program received signal SIGSEGV, Segmentation fault. 0x00000000 in ?? () (gdb) bt #0 0x00000000 in ?? () #1 0x69b26d74 in draw_quad (bitmap=<incomplete type>, sx=0, sy=0, sw=320, sh=200, cx=0, cy=0, dx=0, dy=0, dw=320, dh=200, xscale=1, yscale=1, angle=0, flags=0) at C:/allegro/allegro-4.9.9.1/src/opengl/ogl_bitmap.c:118 #2 0x69b271bd in ogl_draw_bitmap (bitmap=<incomplete type>, x=0, y=0, flags=0) at C:/allegro/allegro-4.9.9.1/src/opengl/ogl_bitmap.c:202 #3 0x69ac1bd7 in al_draw_bitmap (bitmap=0x3f6c18, dx=0, dy=0, flags=0) at C:/allegro/allegro-4.9.9.1/src/bitmap_new.c:278 #4 0x00401477 in _mangled_main () #5 0x69afeb68 in _WinMain (_main=0x4012e0, hInst=0x400000, hPrev=0x0, Cmd=0x241f18 "", nShow=10) at C:/allegro/allegro-4.9.9.1/src/win/wnewsys.c:136 #6 0x00401539 in WinMain@16 () #7 0x00401881 in main () (gdb) quit Hope it's useful to the devs. Also, any explanation on why bitmap drawing routines are so slow on my machine?. Thanks.
|
Milan Mimica
Member #3,877
September 2003
![]() |
Probably trying to call glBlendFuncSeparate() when the feature is not available. Fixed in SVN already.
-- |
kenmasters1976
Member #8,794
July 2007
|
Just built r12036 and yes, OpenGL works great there. I tried a simplified version of ex_bitmap with a frame counter and I get around 200 fps using OpenGL (200 fps is great on my machine, I think). Thanks.
|
Mr. Accident
Member #3,508
May 2003
![]() |
Trent Gamblin said: Unfortunately, like 4.9.7, 4.9.9 doesn't build with MSVC. We might have to release a 4.9.9.1 in a few days to fix that and the demo bug (which BTW works with GCC 4.2.1 for me). I don't know if it's the same problem, but I had a slight issue building 4.9.9.1 on Visual Studio 2008: after generating the solution/project files with CMake, nearly all of the projects failed because "dxguid.lib" could not be found -- I had to add the DirectX SDK library path to all of the projects' settings before it would build. This was after already specifying the DX SDK libs path to CMake when generating the solution, FWIW. Also, one question: are there any plans to add the default font back into the font addon? It's really annoying having to include a font file and load it for every project, no matter how tiny. It was really nice in Allegro 4 being able to just slap in the default "font" if I just wanted text on the screen and didn't particularly care how it looked, and I'm really feeling its absence. Also also, is there a reason that the font bitmap background color is bright, violent yellow? It's not a big deal I guess, but just looking at it hurts my eyes... If the reason is "to hurt Allegro users' eyes," then I guess I could understand that... at least it would be a reason...
|
Thomas Fjellstrom
Member #476
June 2000
![]() |
Mr. Accident said: Also also, is there a reason that the font bitmap background color is bright, violent yellow? It's not a big deal I guess, but just looking at it hurts my eyes... Its BECAUSE it hurts people's eyes that its used. Its a very uncommon color, so it was picked to be a reserved color. At least thats why it was picked for a4. -- |
Mr. Accident
Member #3,508
May 2003
![]() |
Well, true, but Magic Purple hurts a little bit less than the yellow... Any particular reason that wasn't used?
|
Thomas Fjellstrom
Member #476
June 2000
![]() |
Magic Pink is also used. The Yellow is for the background around the chars, the pink is used for the char's actual bg, since it's treated as translucent. Or at least I think thats how it went -- |
Elias
Member #358
May 2000
|
Thomas Fjellstrom said: Magic Pink is also used. The Yellow is for the background around the chars, the pink is used for the char's actual bg, since it's treated as translucent. Or at least I think thats how it went No. The character background uses actual transparency. I think we should use the color at 0/0 instead of yellow. Then you can use whatever you like. And I also think we should add back a builtin bitmap font - there are cases where it is nice to have, e.g. debug messages before your truetype fonts are loaded -- |
Evert
Member #794
November 2000
![]() |
I have a port of A4's default font to A5. It even overloads the font vtable so it can use the same data format as A4 (ie, you can just use it without having to do anything special). The only issue is performance is atrocious, but that could be remedied by actually doing the conversion to an A5 bitmap font automatically the first time the font is used. |
Elias
Member #358
May 2000
|
I just changed the addon in SVN so you can now use any color as background instead of yellow. -- |
|
|