Hi guys:
I am a rookie in JOGL and just started 1weeks ago,
I just want to use “glut.glutSolidCube(gl, 3);” to draw a torus,
and my code is:
GL gl = GLDrawable.getGL(gl);
GLUT glut = new GLUT();
glut.glutSolidCube(gl, 3);
but the compiler always told me the following error information:
“non-static method getGL() cannot be referenced from a static contex”
so, how can I anounce and initial gl,
Could you give me some help?
Thanks a lot.