How do I achieve antialias with allegro 5.0


al_set_new_display_option(ALLEGRO_SAMPLE_BUFFERS, 1, ALLEGRO_REQUIRE); /* Make this a ALLEGRO_SUGGEST if you don't want it to fail if your GPU doesn't support multisampling */
al_set_new_display_option(ALLEGRO_SAMPLES, 4, ALLEGRO_SUGGEST);

before creating the display.

Todd Cope

You may also want to do this before loading your bitmaps:

al_set_new_bitmap_flags(ALLEGRO_MIN_LINEAR | ALLEGRO_MAG_LINEAR);


Cool thanks, and what do you mean by allegro_suggest, how do I do it that way, thanks.

Did allegro 4 have antialias, i'm learning about soo many cool things about allegro 5



I see what you mean by allegro suggest, nvrmnd


His next line has the ALLEGRO_SUGGEST. Just have the first line but switch the last argument.


I'm not sure if its working, when I call allegro_suggest using both functions above, the program dosent start, it fails(no errors) to create the display window.

I am calling it before display is created. When I call allegro_require on both functions it creates the display window but i'm not sure if its actually working, i'm trying to see now if I can notice a difference with it on and off.


I there antialiassing options for allegro 4.4?

Does it applies only to ttf and text, or can it also be used for bitmaps?

Todd Cope

Some TTF add-ons for Allegro 4 support anti-aliasing. There are also add-ons to handle anti-aliased bitmap drawing. You can find these in the Libraries section of this site.


Are you saying this antialias in 5.0.6 is only for text?

Todd Cope

No. larienna asked about anti-aliasing with Allegro 4. In A5, anti-aliasing affects everything if you have it enabled.


I'm thinking maybe my lenovo laptop does not support msaa. But I tried the game on my desktop which I know supports msaa because I've played MW2 on it with AA settings and I've played Crysis on my desktop with AA on. It fails to create the display also when I run it on my desktop, nothing happen I double click the exe.

Any ideas?

Thread #610416. Printed from