PDA

View Full Version : Antialiased render



tanffn
12-10-2006, 06:10 PM
I was thinking about creating a small game and for that I crated a small Vector based engine that uses SDL for the rendering ( :arrow: ).

For that I want to enrich sdlutils with more drawing functions, so far I’ve only been able to create an AA_line procedure (based on WuLine, no thickness), AA_Disc and AA_circle (both with thickness).
I still like to add:
AA_line with thickness
AA_Rect with thickness (border only and filled)
AA_Triangle with thickness (border only and filled)
AA_Bezier_Curve with thickness (opened/closed, border only and filled)

Now the problem is that my maths skills are not that good.. I have no problem implementing all types of basic shapes but it will be far from optimized..
So is there someone would like to join the effort?

I found this lib which looks great, translated from c++, barely readable..
http://aggpas.org/aggpas-demo.htm

:arrow:
Download it here (http://www.global-rd.com/ariel/VectorTest.zip)
[*/] Rotate
[+-] Scale
[Arrows] to move the ant (don’t get out of the screen!)

savage
12-10-2006, 07:10 PM
Wow AggPas seems very comprehensive.

tanffn
12-10-2006, 08:03 PM
Thought its barely readable :cry: I wasn't able to follow the code..

tanffn
14-10-2006, 11:01 AM
Since it looks I’m the only one interested in those drawing functions I didn’t bothered uploading the code, thought I’ll ask Dom to include it to sdlutils.

The thick line function is problematic, it simply uses many AA_Line => performance and quality drop.
I still need to add polygon render function.

you can download the updated test app from here (http://www.global-rd.com/ariel/VectorTest.zip)
Keys:
[*/] Rotate
[+-] Scale
[Arrows] to move the ant
[Key pad] to 'move the world'
[1..4 + mouse click] to control the curve
[5 + mouse click] to move the line

http://upload4.postimage.org/1389184/1.jpg (http://upload4.postimage.org/1389184/photo_hosting.html)

savage
14-10-2006, 03:13 PM
I think this is pretty cool set of functions and they look quite good.
If only they could be a faster.