Allegro.cc - Online Community

Allegro.cc Forums » Allegro Development » Allegro 4.9.9

This thread is locked; no one can reply to it. rss feed Print
 1   2   3 
Allegro 4.9.9
Peter Wang
Member #23
April 2000

Allegro 4.9.9 is available.

EDIT: Allegro 4.9.9.1 is available.

Changes from 4.9.9 to 4.9.9.1 (March 2009)
==========================================

- Made it compile and work with MSVC and MinGW 3.4.5.

- Enabled SSE instruction set in MSVC.

- Fixed X11 XIM keyboard input (partially?).

- Fall back on the reference (software) rasterizer in D3D.

Changes from 4.9.8 to 4.9.9 (March 2009)
========================================

The main developers this time were: Trent Gamblin, Evert Glebbeek, Milan
Mimica, Elias Pschernig, Paul Suntsov, Peter Wang. Other contributions
from: Todd Cope, Angelo Mottola, Trezker.

Graphics:

- Added display options API and scoring, based on AllegroGL, for finer
control over display creation.

- Added API to query possible display formats (implemented on X, Mac OS X).

- Changed the bitmap locking mechanism. The caller can choose a pixel
format.

- Added support for multisampling.

- Simplified the semantics of al_update_display_region().

- Optimised software blitting routines.

- Optimised al_map_rgb/al_map_rgba.

- Replaced al_draw_rectangle() and al_draw_line() from core library with
al_draw_rectangle_ex() and al_draw_line_ex() from the primitives addon.

- Implemented al_wait_for_vsync() everywhere except WGL.

- Fixed problems with sub-bitmaps with the OpenGL driver.

- Fixed bugs in software scaled/rotated blit routines.

- Added a new pixel format ALLEGRO_PIXEL_FORMAT_ABGR_F32.
Removed ALLEGRO_PIXEL_FORMAT_ANY_15_WITH_ALPHA,
ALLEGRO_PIXEL_FORMAT_ANY_24_WITH_ALPHA.

- Added support for creating OpenGL 3.0 contexts (untested; only WGL/GLX for
now). Relevant display flags are ALLEGRO_OPENGL_3_0 and
ALLEGRO_OPENGL_FORWARD_COMPATIBLE.

- Allow disabling any OpenGL extensions from allegro.cfg to
test alternative rendering paths.

- Fixed problem with windows only activating on title bar clicks (Windows).

- Fixed a minimize/restore bug in D3D (with the help of Christopher Bludau).

Input:

- Implemented al_set_mouse_xy under X11.

- Added ALLEGRO_EVENT_MOUSE_WARPED event for al_set_mouse_xy().

Path routines:

- Made al_path_get_drive/filename return the empty string instead of NULL
if the drive or filename is missing.

- Changed al_path_set_extension/al_path_get_extension to include the leading
dot.

- Made al_path_get_extension(), al_path_get_basename(), al_path_to_string()
return pointers to internal strings.

Unicode:

- Changed type of ALLEGRO_USTR; now you should use pointers to ALLEGRO_USTRs.

- Added UTF-16 conversion routines.

Other core:

- Added ALLEGRO_GET_EVENT_TYPE for constructing integers for event type IDs.

- Renamed configuration function names to conform to conventions.

- Removed public MIN/MAX/ABS/MID/SGN/CLAMP/TRUE/FALSE macros.

- Replaced AL_PI by ALLEGRO_PI and documented it as part of public API.

Audio addons:

- Added stream seeking and stream start/end loop points.

- Add panning support for kcm_audio (stereo only).

Font addons:

- Made al_font_grab_font_from_bitmap() accept code point ranges.

- Made font routines use new UTF-8 routines; lifted some arbitrary limits.

- Fixed artefacts in bitmap font and TTF rendering.

Image I/O addon:

- Made the capability to load/save images from/to ALLEGRO_FS_ENTRYs public.

- Added missing locking to .png save function.

Other addons:

- Added native_dialog addon, with file selector dialogs.

- Fixed many bugs in the primitives addon.

- Made hsv/hsl color functions accept angles outside the 0..360° range.

- Fixed a bug in al_color_name_to_rgb.

Examples:

- New programs: ex_audio_props, ex_blend_bench, ex_blend_test, ex_blit,
ex_clip, ex_draw, ex_font_justify, ex_gl_depth, ex_logo, ex_multisample,
ex_native_filechooser, ex_path_test, ex_rotate, ex_stream_seek, ex_vsync,
ex_warp_mouse.
(ex_draw demonstrated known bugs currently.)

- Updated programs: ex_joystick_events, ex_monitorinfo ex_pixelformat,
ex_scale, ex_subbitmap.

Build system:

- Added pkg-config support. .pc files are generated and installed on Unix.

- Allowed gcc to generate SSE instructions on x86 by default. For Pentium 2
(or lower) compatibility you must uncheck a CMake option before building
Allegro.

Other:

- Many other bug fixes.

GullRaDriel
Member #3,861
September 2003
avatar

I am downloading it ! :D

Edit:
I catch that error when compiling:

mingw32-make said:

D:\Documents and Settings\Administrateur\Bureau\allegro-4.9.9\allegro\src\wind3d_disp.cpp: In function `bool _al_d3d_init_display()':
D:\Documents and Settings\Administrateur\Bureau\allegro-4.9.9\allegro\src\wind3d_disp.cpp:816: error: `D3D9b_SDK_VERSION' was not declared in this scope
D:\Documents and Settings\Administrateur\Bureau\allegro-4.9.9\allegro\src\wind3d_disp.cpp:816: warning: unused variable 'D3D9b_SDK_VERSION'
mingw32-make[2]: *** [CMakeFiles/allegro.dir/src/win/d3d_disp.cpp.obj] Error 1
mingw32-make[1]: *** [CMakeFiles/allegro.dir/all] Error 2
mingw32-make: *** [all] Error 2

Edit 2: Nevermind. I was just in need of the new dx9 package for mingw.

Edit 3:

Now come the real bug:

Each example launched said:

D:\Documents and Settings\Administrateur\Bureau\allegro-4.9.9\allegro\build\demo>gdb demo.exe
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-mingw32"...
(gdb) run
Starting program: D:\Documents and Settings\Administrateur\Bureau\allegro-4.9.9\allegro\build\demo/demo.exe
[New thread 2012.0x214]
[New thread 2012.0x6d4]

Program received signal SIGSEGV, Segmentation fault.
0x6b69117e in al_set_new_display_option (option=22, value=0, importance=1)
at D:/Documents and Settings/Administrateur/Bureau/allegro-4.9.9/allegro/src/display_settings.c:36
36 extras->required |= 1 << option;
(gdb) p extras
$1 = (ALLEGRO_EXTRA_DISPLAY_SETTINGS *) 0x0
(gdb) p extras -> required
Cannot access memory at address 0x0

#SelectExpand
1/* Function: al_set_new_display_option 2 */ 3void al_set_new_display_option(int option, int value, int importance) 4{ 5 ALLEGRO_EXTRA_DISPLAY_SETTINGS *extras; 6 extras = _al_get_new_display_settings(); 7 switch (importance) { 8 case ALLEGRO_REQUIRE: 9 extras->required |= 1 << option; /* extra is NULL !!!! and so '->required' is segfaulting */ 10 extras->suggested &= ~(1 << option); 11 break; 12 case ALLEGRO_SUGGEST: 13 extras->suggested |= 1 << option; 14 extras->required &= ~(1 << option); 15 break; 16 case ALLEGRO_DONTCARE: 17 extras->required &= ~(1 << option); 18 extras->suggested &= ~(1 << option); 19 break; 20 } 21 extras->settings[option] = value; 22}

Edit 3:
A little bit of research later, it seems that _al_get_new_display_settings() can return 0 without it to be an error. As 'extras' is unchecked, it's segfaulting.

"Code is like shit - it only smells if it is not yours"
Allegro Wiki, full of examples and articles !!

Trezker
Member #1,739
December 2001
avatar

I'm having a problem with stopping a stream.
This property only works if I call it before attaching to voice.
al_set_stream_bool(work_sound_stream, ALLEGRO_AUDIOPROP_PLAYING, false);

#SelectExpand
1#include <allegro5/allegro5.h> 2#include <allegro5/a5_iio.h> 3#include <allegro5/a5_font.h> 4#include <allegro5/a5_ttf.h> 5#include <allegro5/acodec.h> 6#include <allegro5/kcm_audio.h> 7#include <iostream> 8 9int main(int argc, char *argv[]) 10{ 11 al_init(); 12 al_install_keyboard(); 13 al_iio_init(); 14 al_font_init(); 15 al_install_audio(ALLEGRO_AUDIO_DRIVER_AUTODETECT); 16 17 ALLEGRO_DISPLAY *display; 18 al_set_new_display_flags(ALLEGRO_WINDOWED); 19 display = al_create_display(640, 480); 20 21 ALLEGRO_EVENT_QUEUE *event_queue = al_create_event_queue(); 22 al_register_event_source(event_queue, (ALLEGRO_EVENT_SOURCE *)display); 23 al_register_event_source(event_queue, (ALLEGRO_EVENT_SOURCE *)al_get_keyboard()); 24 25 ALLEGRO_FONT* font = al_ttf_load_font("media/DejaVuSans.ttf", 20, 0); 26 27 double last_time = al_current_time(); 28 29 ALLEGRO_VOICE* voice; 30 ALLEGRO_STREAM* work_sound_stream; 31 voice = al_create_voice(44100, ALLEGRO_AUDIO_DEPTH_INT16, ALLEGRO_CHANNEL_CONF_2); 32 33 int buffer_count = 4; 34 int samples = 2048; 35 work_sound_stream = al_stream_from_file(buffer_count, samples 36 , "/home/anders/Music/Brad Sucks - I Don't Know What I'm Doing -- Jamendo - OGG Vorbis q7 - 2007.01.08 [www.jamendo.com]/02 - Look and Feel Years Younger.ogg"); 37 if(!work_sound_stream) 38 printf("Could not load\n"); 39 al_attach_stream_to_voice(voice, work_sound_stream); 40 al_set_stream_bool(work_sound_stream, ALLEGRO_AUDIOPROP_PLAYING, false); 41 42 bool playing = false; 43 bool quit = false; 44 while(1) 45 { 46 if (quit) 47 break; 48 ALLEGRO_EVENT event; 49 if (al_get_next_event(event_queue, &event)) 50 { 51 if (ALLEGRO_EVENT_KEY_DOWN == event.type) 52 { 53 if (ALLEGRO_KEY_ESCAPE == event.keyboard.keycode) 54 { 55 break; 56 } 57 if (ALLEGRO_KEY_SPACE == event.keyboard.keycode) 58 { 59 playing = !playing; 60 al_set_stream_bool(work_sound_stream, ALLEGRO_AUDIOPROP_PLAYING, playing); 61 } 62 } 63 if (ALLEGRO_EVENT_DISPLAY_CLOSE == event.type) 64 { 65 break; 66 } 67 } 68 al_clear(al_map_rgb(0, 0, 0)); 69 al_font_textprintf(font, 10, 10, playing?"Playing":"Stopped"); 70 al_flip_display(); 71 } 72 73 return 0; 74} 75END_OF_MAIN()

Elias
Member #358
May 2000

Now come the real bug:

Which gcc version?

--
"Either help out or stop whining" - Evert

GullRaDriel
Member #3,861
September 2003
avatar

Elias: gcc version 3.4.5 (mingw-vista special r3) , but it's not the static build. The demo & examples need their dlls to work fine.

"Code is like shit - it only smells if it is not yours"
Allegro Wiki, full of examples and articles !!

Elias
Member #358
May 2000

Can you try with 4.x?

[edit:]

For example 4.3.0: http://sourceforge.net/project/showfiles.php?group_id=2435

It's still important to fix it for 3.x of course - just would be good to know if it's just an outdated compiler causing the problem or something else.

--
"Either help out or stop whining" - Evert

GullRaDriel
Member #3,861
September 2003
avatar

Just let me save my current mingw directory, install a fresh new TDM build, freshen up the whole thing and I will tell you.

Edit:
Working fine for my problem with gcc version 4.3.3 (4.3.3-tdm-1 mingw32).

Can't it come from the static DWORD tls_index; at tls.c line 78 not being initalized correctly with gcc 3 series ? -> Edit: NO !

I will try to add a call to GetLastError (which is preconized by the msnd about TlsGetValue returning 0) and tell you what is going on.

"Code is like shit - it only smells if it is not yours"
Allegro Wiki, full of examples and articles !!

kenmasters1976
Member #8,794
July 2007

Nice. I'm downloading it.

No codename this time?.

KnightWhoSaysNi
Member #7,339
June 2006
avatar

I got the exact same problem as GullRaDriel here using the same compiler version he did. I am now upgrading to mingw 4.x

Trent Gamblin
Member #261
April 2000
avatar

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'm uploading MinGW binaries of 4.9.9 to http://allegro5.org as I type this.

count
Member #5,401
January 2005

I'm uploading MinGW binaries of 4.9.9 to http://allegro5.org as I type this.

Awesome. Thanks!

And the 4.9.9 release is awesome too! Good work guys!

kenmasters1976
Member #8,794
July 2007

I got the exact same problem as GullRaDriel here using the same compiler version he did. I am now upgrading to mingw 4.x

Same problem here. Same gcc version.

Too bad. I was really looking forward to try it.

Trent Gamblin
Member #261
April 2000
avatar

The demo started off as a game on my website, so you could grab a binary there if you just want to try it: http://nooskewl.com/index.php?option=com_content&task=view&id=14&Itemid=26

Uses an old version of 4.9 so it may not work as well as the 4.9.9 demo would.

Peter Wang
Member #23
April 2000

Trezker: thanks for reporting, will investigate. It does work if you attach the stream to a mixer, and the mixer to the voice.

kenmasters1976
Member #8,794
July 2007

I've made a quick fix. Don't know if it's correct or not, but now the examples are working with gcc 3.4.5.

display_settings.c#SelectExpand
30void al_set_new_display_option(int option, int value, int importance) 31{ 32 ALLEGRO_EXTRA_DISPLAY_SETTINGS *extras; 33 extras = _al_get_new_display_settings(); 34
35 if (extras == NULL) return;
36 37 switch (importance) { 38 case ALLEGRO_REQUIRE: 39 extras->required |= 1 << option; 40 extras->suggested &= ~(1 << option); 41 break; 42 case ALLEGRO_SUGGEST: 43 extras->suggested |= 1 << option; 44 extras->required &= ~(1 << option); 45 break; 46 case ALLEGRO_DONTCARE: 47 extras->required &= ~(1 << option); 48 extras->suggested &= ~(1 << option); 49 break; 50 } 51 extras->settings[option] = value; 52}

[EDIT:] Programs using OpenGL keep crashing, but at least I can try 4.9.9 using Direct3D.

[EDIT 3:] Duh!... nevermind about EDIT 2... now I get what it's doing...

Peter Wang
Member #23
April 2000

See updated original post.

Trent Gamblin
Member #261
April 2000
avatar

4.9.9.1 binaries for Windows can be found at http://allegro5.org. Note that the version number was bumped to 4.9.10 but these are not 4.9.10 binaries, they're 4.9.9.1.

GullRaDriel
Member #3,861
September 2003
avatar

Thanks for fixing it

"Code is like shit - it only smells if it is not yours"
Allegro Wiki, full of examples and articles !!

Peter Wang
Member #23
April 2000

Note that the version number was bumped to 4.9.10

That's true if you built it from SVN, but if you built it from the release it would still say 4.9.9.

Trent Gamblin
Member #261
April 2000
avatar

I built from svn after checking out tag 4.9.9.1.

Peter Wang
Member #23
April 2000

Yes, the tag will have the wrong version number. The release is correct though.

I'll consider changing the release procedure next time around.

kenmasters1976
Member #8,794
July 2007

Programs using OpenGL keep crashing on my machine with 4.9.9.1. I have an old integrated Intel graphics card.

Anyone else with integrated Intel card having this problem?.

axilmar
Member #1,204
April 2001

So around when Allegro 5 will be released?

Evert
Member #794
November 2000
avatar

When it's done.

Milan Mimica
Member #3,877
September 2003
avatar

Programs using OpenGL keep crashing on my machine with 4.9.9.1. I have an old integrated Intel graphics card.

Show your bo log file.

 1   2   3 


Go to: