Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » [a5] antialiased lines

This thread is locked; no one can reply to it. rss feed Print
[a5] antialiased lines
flonominal
Member #12,614
March 2011

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
Supreme Loser
January 1999
avatar

Are you drawing the lines directly to the backbuffer?

flonominal
Member #12,614
March 2011

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

Elias
Member #358
May 2000

Does ex_multisample work?

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

flonominal
Member #12,614
March 2011

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

Elias
Member #358
May 2000

What's your operating system and graphics card?

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

flonominal
Member #12,614
March 2011

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
Member #358
May 2000

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.

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

Thomas Fjellstrom
Member #476
June 2000
avatar

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

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

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Elias
Member #358
May 2000

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

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

GullRaDriel
Member #3,861
September 2003
avatar

That's how I get it.

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

Go to: