[a5] antialiased lines
flonominal

how do i draw antialiased lines in allegro 5? ive already done:

  al_set_new_display_option(ALLEGRO_SAMPLE_BUFFERS, 1, ALLEGRO_REQUIRE);
  al_set_new_display_option(ALLEGRO_SAMPLES, 4, ALLEGRO_REQUIRE);

but that doesn't change anything

with:
{"name":"2h4jg9c.png","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/0\/5\/05bd328213aa6e9c5687caddc7eb4d38.png","w":469,"h":419,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/0\/5\/05bd328213aa6e9c5687caddc7eb4d38"}2h4jg9c.png
without:
{"name":"90p0yq.png","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/b\/6\/b6f7b74587dc3b3ca0b9c9e1063a66b5.png","w":467,"h":427,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/b\/6\/b6f7b74587dc3b3ca0b9c9e1063a66b5"}90p0yq.png

Matthew Leverton

Are you drawing the lines directly to the backbuffer?

flonominal

i never changed the current display, so i'm assuming yeah, i'm drawing to the backbuffer

Elias

Does ex_multisample work?

flonominal

yes, i can run ex_multisample (although I don't see a difference between the two windows)

Elias

What's your operating system and graphics card?

flonominal

whether its my laptop or my desktop (2 different os's and graphics card), its still un-sampled. i changed the require to suggest and it worked (although if i could somehow enable antialiasing, that would be much better)

Elias

i changed the require to suggest and it worked

Good that it's working now. And looks like you found a bug in Allegro - I'll put it into the bug tracker.

Thomas Fjellstrom

(although if i could somehow enable antialiasing, that would be much better)

Multisampling is how gpu's do anti-aliasing afaik.

Elias

Hm, did I understand right, with ALLEGRO_SUGGEST, multi-sampling actually does work?

GullRaDriel

That's how I get it.

Thread #606832. Printed from Allegro.cc