Antialiased off-screen rendering in GLGraphics   Leave a comment

Thanks to the contribution of Ilias Bergstrom, GLGraphics now allows to create off-screen drawing surfaces with 4x (and even higher) antialiasing!

The use is quite straightforward. By calling the constructor of GLGraphicsOffScreen without any extra arguments after the width and height:

canvas = new GLGraphicsOffScreen(this, 640, 480);

then a regular, non-antialiased rendering surface is created. But now a fourth boolean argument allows to enable/disable antialiasing:

canvas = new GLGraphicsOffScreen(this, 640, 480, true);

By default, 4x antialiasing is applied, but this can be changed by setting the multisampling level explicitly:

canvas = new GLGraphicsOffScreen(this, 640, 480, true, 8);

This is available in version 0.8.9.5 of GLGraphics.

Advertisements

Posted February 19, 2009 by ac in Programming

Tagged with , , , , , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: