Portability issues with the anti aliasing

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Portability issues with the anti aliasing

sylvestre
Hello,

I would like to use the following code in my application:
GLProfile profile = GLProfile.getDefault();
GLCapabilities capabilities = new GLCapabilities(profile);
capabilities.setSampleBuffers(true);
capabilities.setNumSamples(4);

However, I have concern about the behavior on old graphic cards (or bad drivers).

Any positive or negative feedbacks ?

thanks
S
Reply | Threaded
Open this post in threaded view
|

Re: Portability issues with the anti aliasing

gouessej
Administrator
Hi

You can check whether anti aliasing is supported with GL.isExtensionAvailable("GL_ARB_multisample"), GL.isExtensionAvailable("GL_EXT_framebuffer_multisample"), GL.isExtensionAvailable("GL_EXT_framebuffer_blit")) and GL.glGetIntegerv(GL.GL_MAX_SAMPLES_EXT, IntBuffer) (example code with JOGL 1.1.1a from Ardor3D).
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Portability issues with the anti aliasing

sylvestre
Bonjour,

On 05/06/2012 17:06, gouessej [via jogamp] wrote:
> Hi
>
> You can check whether anti aliasing is supported with
> GL.isExtensionAvailable("GL_ARB_multisample"),
> GL.isExtensionAvailable("GL_EXT_framebuffer_multisample"),
> GL.isExtensionAvailable("GL_EXT_framebuffer_blit")) and
> GL.glGetIntegerv(GL.GL_MAX_SAMPLES_EXT, IntBuffer) (example code with
> JOGL 1.1.1a from Ardor3D).
Is it reliable ? Ie, do all drivers will respect these extensions ?

Merci Julien,
Sylvestre

Reply | Threaded
Open this post in threaded view
|

Re: Portability issues with the anti aliasing

gouessej
Administrator
You're welcome. Anti-aliasing can be very slow on some drivers, feel free to make a black list in order to avoid to use it when it is not worth a try. No all drivers do not support these extensions otherwise I would not suggest you to check them by using isExtensionAvailable.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Portability issues with the anti aliasing

Sven Gothel
Administrator
In reply to this post by sylvestre
On 06/05/2012 11:55 AM, sylvestre [via jogamp] wrote:

> Hello,
>
> I would like to use the following code in my application:
> GLProfile profile = GLProfile.getDefault();
> GLCapabilities capabilities = new GLCapabilities(profile);
> capabilities.setSampleBuffers(true);
> capabilities.setNumSamples(4);
>
> However, I have concern about the behavior on old graphic cards (or bad drivers).
>
> Any positive or negative feedbacks ?
Well, the MSAA results on GPUs - indeed.

The above used [caps] API is supported by the
standard MSAA extensions:
  EGL_SAMPLES, GLX_SAMPLES, WGL_SAMPLES_ARB
as well as NV Tegra's EGL_COVERAGE_SAMPLES_NV.

Sometimes it looks bad on one platform, .. etc.

Sadly we have no picture comparison right now,
even though you could DL our jenkins build test data
and compare screenshots of our graph tests
running on NVidia/AMD on Windows/Linux/OSX/Solaris.

Guess we should add screenshots to the other MSAA unit tests
to allow a comparison there as well.

But this is has a low prio right now and
is not really JOGL bound.

~Sven

>
> thanks
> S
>


signature.asc (910 bytes) Download Attachment