Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (603)
Games in Android Showcase (171)
games submitted by our members
Games in WIP (652)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  "No OpenGL context current on this thread" while calling gluSphere in glNewList  (Read 2610 times)
0 Members and 1 Guest are viewing this topic.
Offline Maok

Senior Newbie

Java games rock!

« Posted 2005-12-06 11:18:40 »

I get an Exception Exception in thread "AWT-EventQueue-0" No OpenGL context current on this thread

here's the deal :

i get the identifiesr for my displayLists with :
public static void createLists(GL gl, GLU glu)
{ = gl; //here i store the current GL and GLU object
    MyGL.glu = glu;
    sphere = gl.glGenLists(1);

then i create the lists with
public static void alterLists()
        GLUquadric quadric = glu.gluNewQuadric();
        glu.gluQuadricTexture(quadric, true);
        glu.gluQuadricNormals(quadric, GLU.GLU_SMOOTH);
        glu.gluQuadricOrientation(quadric, GLU.GLU_OUTSIDE);


and this works fine, but later i have a ruler to chage the complexity (stack and slice number) of my sphere. When the new value for ballAtomComplexity is set by this ruler, i call again the method alterLists(), and then i get the exception with the line glu.gluSphere ....
I don't understand, since the GLU object is the same (i stored it when create the display list IDs
i also tried to put a glu = new GLU(); but its the same
i have no problem with gl.xxxxxxxxxx methods

any hint ?


Offline Ken Russell

JGO Coder

Java games rock!

« Reply #1 - Posted 2005-12-06 12:15:27 »

The OpenGL context is not current in your slider's listener callback. You should update an instance variable in your slider's callback and call display() on your GLCanvas to cause your GLEventListener to be called.
Offline Maok

Senior Newbie

Java games rock!

« Reply #2 - Posted 2005-12-06 13:46:10 »

thx it works now
Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

SHC (21 views)
2015-08-01 03:58:20

Jesse (19 views)
2015-07-29 04:35:27

Riven (39 views)
2015-07-27 16:38:00

Riven (21 views)
2015-07-27 15:35:20

Riven (24 views)
2015-07-27 12:26:13

Riven (14 views)
2015-07-27 12:23:39

BurntPizza (35 views)
2015-07-25 00:14:37

BurntPizza (46 views)
2015-07-24 22:06:39

BurntPizza (28 views)
2015-07-24 06:06:53

NoxInc (35 views)
2015-07-22 22:16:53
List of Learning Resources
by gouessej
2015-07-09 11:29:36

How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37:30

Intersection Methods
by Roquen
2015-05-29 08:19:33

List of Learning Resources
by SilverTiger
2015-05-05 10:20:32

How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!