glu recreation

been awhile since I’ve worked in jogl and was wondering i was able to do GLCanvas.getGLU() but not anymore is there a way to do it?

Just do “new GLU()” at any point in your program. The methods on that object which access OpenGL can only be called when an OpenGL context is current and will throw an exception if none is. Each GLU object should be accessed by at most one thread, but there is no inherent tie to any context, so you don’t need to make a new GLU object in your GLEventListener.init() method.

I just put the GLU as an instance variable and then limiting my use to within the context of the GLEventListener methods. This way I am not recreating new instances of the GLU every time I need it, and thus ensuring one less object to be garbage collected.

Yes, sorry, I should have been more clear about that. I don’t recommend instantiating a new one whenever you need to use it, but my point is that you can instantiate the object anywhere in your program.