jPCT - a 3d engine for Java => Support => Topic started by: fardke on June 27, 2008, 09:07:39 pm

Title: Anti-aliasing
Post by: fardke on June 27, 2008, 09:07:39 pm

I want to activate antialiasing without using openGL renderer. I draw a line between 2 objects and the link is very aliased (ugly, like stairs).

Is it possible? And how?

Thank you!
Title: Re: Anti-aliasing
Post by: EgonOlsen on June 27, 2008, 11:53:46 pm
Depends on how you are drawing that line. You can use two different anti-aliasing modes when using the software renderer. You choose them when creating the FrameBuffer. For example this: http://www.jpct.net/doc/com/threed/jpct/FrameBuffer.html#SAMPLINGMODE_OGSS_FAST (http://www.jpct.net/doc/com/threed/jpct/FrameBuffer.html#SAMPLINGMODE_OGSS_FAST)

You pay the price in fillrate when enabling this, i.e. your rendering gets slower. If you are using standard Java2D line drawing to draw that line, this setting doesn't apply. In that case, you have to enable anti-aliasing in Java2D, which should be possible somehow...