Object Selection

I just started with jogl, so I’m still a bit of a noob.

I’m currently doing a scientific visualization using jogl and currently have a 3d scatter of 3d balls on a graph. What I want to do know is when a user clicks on a ball some information about that ball appears in a pop up window.

My problem is that I can’t seem to get a current gl object when I’m in the mouseClicked method of my MouseListener subclass. I want to use the object selection technique which is on gametutorials.com. Is this the best way to go or is there something better?

If this has already been a post tell me, I went through them all but I must have missed it.

Thanks :slight_smile:

This is a threading issue that you have to be aware of when using jogl. Your opengl context is only valid on the thread you initialized it on. That thread isn’t your event thread so you can’t make calls to opengl from the event thread. There are other threads in this forum on threading so search for those.

Okay. Thank you very much for you help. :slight_smile: