Drawing text to a canvas

Hi there!

I’m new to JOGL and I’m trying to draw text to a canvas using GLUT.glutBitmapString(int, String).
I’ve seen the old class method was glutBitmapString(GL, int, String). How shall I use the new method without passing the GL parameter?

Thanks in advance.

You don’t need to pass the GL explicitly any more. The GLUT implementation now picks it up automatically from the current GLContext. Just make sure you continue to call GLUT only while an OpenGL context is current, otherwise an exception will be thrown.