The method glBegin(int) is undefined for the type GL

Hi,
I am working with some code that was written about year or two ago just before or about the same time last major changes to JOGL took place, and I am getting some errors that appear to be the result of that. Could someone type me what would be the “smartest” way to fix this without having to go through the code line by line and make changes. I have included this one error as an example of the kinds of things I am seeing. For example, in one class, everywhere there is a line such as:

gl.glBegin(GL.GL_TRIANGLES);

i get the error message:

The method glBegin(int) is undefined for the type GL

I tried switching to using GL3 in the hopes that might help but error remained same.

Thanks,
Edward

Switch to GL2

Try doing GL11.glBegin(int) instead. It’s a static method but I think you’ll get the same results, and you don’t need to create a new object.

This should not be in the Contests forum. A mod should move this to the JOGL forum

He’s looking at jogl, not lwjgl.

Oh.

Hi

This method is in GL2, the public API of JOGL has changed a lot between its first version and the second one. I agree with ra4king, this thread should be moved into the JOGL section.