Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8406757
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T23:11:53+00:00 2026-06-09T23:11:53+00:00

I encountered a similar problem when I started learning Opengl (JOGL) for the GL2

  • 0

I encountered a similar problem when I started learning Opengl (JOGL) for the “GL2 gl” months ago…. and then I discovered how to solve (everything having something to do with “gl” should be called from within the display/init method).

After some time I also needed to use the “GLU glu” (for the gluOrtho2D). Therefore this problem arose again. But lets say that it wasn’t such a big problem, because the program was running fine despite this error.

Unfortunately, it seems that now this problem has some annoying effects.. so I really would like to solve it.

Here some code:

...
GLU glu = new GLU();

public void display(GLAutoDrawable gLAutoDrawable) {
    ...
    //  map a 2D bild width*height on OpenGL
    glu.gluOrtho2D(-width/2, (width+1)/2, -(height+1)/2, height/2);
}        

The funny thing is that:

  • I have other glu calls in the display, like “glu.gluLookAt(0, 0, 1, 0, 0, 0, 0, -1, 0);” and I never got a problem there

  • It takes place only when I call a refresh from another thread (“glcanvas.display”)

  • I already did many attempts like initialize it everytime in the display, or forcing the context with:

    glu = new GLU();
    gLContext = gLCanvas.getContext();
    gLContext.makeCurrent();
    

but nothing so far worked:

Exception in thread “AWT-EventQueue-0” javax.media.opengl.GLException: No OpenGL context current on this thread
at javax.media.opengl.glu.GLU.getCurrentGL(GLU.java:175)
at javax.media.opengl.glu.GLU.gluOrtho2D(GLU.java:1344)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T23:11:55+00:00Added an answer on June 9, 2026 at 11:11 pm

    I tried to move the getContext and the makeCurrent just before the glu.gluOrtho2D and it worked..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I encountered a problem after having more than one texture in my engine. My
I have encountered a similar problem described here (and in other places) - where
I've recently encountered a problem, and despite coming across similar questions here alreadt, none
I encountered similar problem if statement vs OO Design - 1 but it is
I haven't written any code yet, but I've encountered a similar problem before. Hopefully
I have encountered a similar problem to others on SO regarding the orientation of
Encountered a frustrating problem in our application today which came down to an ArrayIndexOutOfBounds
i encountered a problem using the apache commons-net telnet api, and hope you can
I encountered an odd problem when migrating an HTML page I'd been developing in
I encountered the following problem after upgrading to the latest version 1.8.1 of data.table

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.