1

I am Using Java OpenGL(JOGL). I knew GL context depends on each thread. But I have to convert Local coordinate to Global one when mouse clicked. Can I refer the CACHED GL CONTEXT in AWT EVENT THREAD? If I can not, then is there any alternative logic?

1 Answer 1

0

Please read the JOGL user's guide. You mustn't use a GL instance when its OpenGL context isn't current, you mustn't store the GL instance, you should use it in a GLEventListener and you should avoid passing it. You can use GLAutoDrawable.invoke() to execute a task when the drawable is displayed. I don't advise you to make the OpenGL context current even though it's possible.

Are you sure that you need something OpenGL related to convert local coordinates to global ones?

Finally, you should rather ask questions specific to JOGL on our official forum as only a very few JogAmp contributors come here. We can't be everywhere.

Sign up to request clarification or add additional context in comments.

3 Comments

Dear gouessej, thank you inviting me. BUT I can not find the way to ask my question to another. I am very sorry but could you please tell me how to post my question.
I am very sorry, I find START NEW TOPIC ANCHOR.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.