Jogl2 and GL3.1 problem

Hello,

In our current project i was asked to test glsl 1.4 functionality. Actually i am a C++ coder and have limited experince with Jogl.
My problem is : I can’t get GL 3.1 support with Jogl.

GL3 gl3 = glCanvas.getGL().getGL3();

this code throws exception. This is the exception:

Exception in thread "main" javax.media.opengl.GLException: Not a GL3 implementation
          at com.sun.opengl.impl.gl2.GL2Impl.getGL3(GL2Impl.java:18971)

I am on WinXp Pro 32 bits , Nvidia 182.52 drivers installed and have a GeForce GTX 285 Gfx card. Oh and i am using Jogl2 test binaries.

Am i missing something too obvious?

scg

You’re supposed to specify the profile during construction:

new GLCanvas(new GLCapabilities(GLProfile.get(GLProfile.GL3)));

Thanks for the help Kiena. My test app works now with GL 3.1

scg