anti-aliasing

How do I anti-aliase polygons? what more do i need to do than enable GL_POLYGON_SMOOTH ?

Choose the right PixelFormat in Display.create(PixelFormat)

You might want to run it in a loop, with preferable pixelformats, and see which PixelFormats work on your card.

could you give me some example code :slight_smile:

Check the Javadoc for PixelFormat. All info is there

You are interested in:

PixelFormat(int alpha, int depth, int stencil, int samples)

the samples. ^^

2 = 2xFSAA
6 = 6xFSAA
etc.

If alpha bits are anything other than 0 then i get an invalidpixelformat exception, does this mean that my card cannot anti-aliase polygons fullstop (although anti-aliiseing lines/points works fine)?

Alpha bits in the framebuffer aren’t needed for antialiasing (or blending, for that matter). They can be handy for some effects - however I’ve found that support for framebuffer alpha can be somewhat unpredictable, so I wouldn’t rely on it. If you really want alpha bits then make sure you request a 24 or 32 bit colour buffer, as otherwise it’s likely to fail.

For proper fullscreen antialiasing (ie not the poly edge/smooth variety) then just stick a 4 (or whatever) as the last param, as Riven mentioned.