How to detect max supported AA samples

Is there a way to know the max supported AA samples at runtime?

I want to avoid the LWJGLException, or to restore the application settings if an LWJGLException occurs, but not getting the application closed.



Regards

well, it says FrameBufferMultisample but it doesn’t seem to say the max number of samples:

INFO: Caps: [FrameBuffer, FrameBufferMRT, FrameBufferMultisample, TextureMultisample, OpenGL20, OpenGL21, OpenGL30, OpenGL31, OpenGL32, ARBprogram, GLSL100, GLSL110, GLSL120, GLSL130, GLSL140, GLSL150, VertexTextureFetch, TextureArray, TextureBuffer, FloatTexture, FloatColorBuffer, FloatDepthBuffer, PackedFloatTexture, SharedExponentTexture, PackedFloatColorBuffer, TextureCompressionLATC, NonPowerOfTwoTextures, MeshInstancing, VertexBufferArray]

what else could I try? If I can't know this at least I would like to avoid the exception If someone using my application sets an unsupported number of samples
thanks

Another option would be to look at FXAA, @phate666 did an excellent job on his implementation, it’s basically AA as a post process filter, so no hardware AA support is required, it runs super fast and (to me) looks on par with around 4x AA.



I’ve never tried to catch LWJGL exceptions from jME so can’t offer any help on that side sorry, but it is something I do have planned to look into, eventually.

i would start by look at renderer.Caps, not sure if it lists AA though.

wow :o!

FXAA is really amazing! I didn’t know it. Great alternative



by the way, I’ve seen that in FXAAFilter, setSubPixelShift() method, a T is missing in material.setFloat(“SubPixelShif”, this.subPixelShift);

Thanks!

karmarok said:
by the way, I've seen that in FXAAFilter, setSubPixelShift() method, a T is missing in material.setFloat("SubPixelShif", this.subPixelShift);
Thanks!

That has been fixed some time ago. Update your SVN.

I have updated my SVN but it is still there.



Line 57: material.setFloat(“SubPixelShif”, this.subPixelShift);

shrug Commit 8087…



http://code.google.com/p/jmonkeyengine/source/detail?r=8087

Man, I swear, there is still a missing T there :cry:



http://img823.imageshack.us/img823/646/fxaa.png

Bwahahah! :smiley: Good catch there! @nehon !!! :wink: