0

My goal is to draw a semi-transparent curve. User moves cursor and I draw the curve under the cursor.

I've tried to use antialiased points to draw line, but I don't know how to make it transparent. I can't use lines to draw the curve, because can't set both antialiasing and line width.

Should I use triangle strip to draw curve?

genpfault
  • 51,148
  • 11
  • 85
  • 139
Evgeny Shurakov
  • 6,062
  • 2
  • 28
  • 22

1 Answers1

2

Yeah, if you want to do a nice job with this, you could tessellate your wide curve into a triangle strip. There are many papers written about stroke tessellation.

You can then texture your triangle strip with a square alpha texture that has a nice solid, anti-aliased circle in it -- this causes the wide line to appear anti-aliased! Check it out:

http://homepage.mac.com/arekkusu/bugs/invariance/TexAA.html

Very cool stuff.

prideout
  • 2,895
  • 1
  • 23
  • 25