JAN
JAN

Reputation: 21865

Jogl-2.0 doesn't support GLAutoDrawable gLDrawable.addKeyListener(this); ?

I'm using Jogl 2.0 , and when I try to do

public class Walking3D implements GLEventListener, KeyListener {

@Override
public void init (GLAutoDrawable gLDrawable) 

{


  // some code 

   gLDrawable.addKeyListener(this);

}}

I get : The method addKeyListener(Walking3D) is undefined for the type GLAutoDrawable

But in Jogl 1.0 it works fine .

What's wrong with it ?

Thanks

Upvotes: 0

Views: 349

Answers (1)

JAN
JAN

Reputation: 21865

Okay , I fixed it with this :

((Component) gLDrawable).addKeyListener(this);

Upvotes: 1

Related Questions