GLCapabilities.setNumSamples problems

I recently started using jogl 2.0.

When I try to enable multi sampling with this code:
GLCapabilities glCap=new GLCapabilities(null);
glCap.setSampleBuffers(true);
glCap.setNumSamples(4);

If setNumSamples() is set to 2 or 1 then it’s fine.
If it’s set to 3+ it gives an error.
If it’s set to 17+ there is no error but nothing happens.

I get this error:
Exception in thread “main” javax.media.opengl.GLException: Invalid result 31 from GLCapabilitiesChooser (should be between 1 and 24)

I have used this before so I know my graphics card isn’t the problem and I’m guessing this has something to do with changes in version 2.0.

Thank you for finding this bug …

Even though its obvious, but just for the sake of saving time
and for validation, can you (and everybody else :slight_smile: please follow:
http://kenai.com/projects/jogl/pages/FAQ#Bugreports_&_Testing

THANK YOU.

Hi!

I am observing the same problem with:

  • nightly build of August 14th, 2009
  • running on jvm 1.6.0_14 from sun (32bit)
  • windows vista

I can reproduce this with the example “Multisample” from the demos of the same build by running it without any modifications.

HTH,
Martin