org.lwjgl.opengl.OpenGLException: Invalid operation (1282)

Hello,



I updated jME today to try a new idea and to see what speed improvements the new updates delivered. The lowest of the code blocks shows the simple program I tried to run. If I removed the following lines:



         Quad q = new Quad("", 1f, 1f);
         
         n.attachChild(q);


I don't get an error, but if I add them, the following error appears.


Build Time: 944ms
org.lwjgl.opengl.OpenGLException: Invalid operation (1282)
   at org.lwjgl.opengl.Util.checkGLError(Util.java:56)
   at org.lwjgl.opengl.Display.update(Display.java:568)
   at com.jme.renderer.lwjgl.LWJGLRenderer.displayBackBuffer(Unknown Source)
   at com.jme.app.BaseGame.start(Unknown Source)
   at nl.tygron.varx.PerformanceTest.main(PerformanceTest.java:42)



The older cvs version of jME that I was using works fine on my system, but this doesn't. What can be wrong?

System:
MacBook Pro Intel Core Due 2.0
Mac OS X 10.4.6
ATI Radeon x1600
1GB RAM


import java.util.logging.Level;

import com.jme.app.SimpleGame;
import com.jme.scene.Node;
import com.jme.scene.shape.Quad;
import com.jme.util.LoggingSystem;

public class PerformanceTest extends SimpleGame {

   @Override
   protected void simpleInitGame() {
      Node sn = new Node("");
      Quad sq = new Quad("", 1f, 1f);
      
      long start = System.currentTimeMillis();
      for(int i = 0; i < 8000; i++){
         Node n = new Node("");
         Quad q = new Quad("", 1f, 1f);
         
         n.attachChild(q);
         rootNode.attachChild(n);
      }
      
      rootNode.updateGeometricState(0, false);
      long end = System.currentTimeMillis();
      
      System.out.println("Build Time: " + (end - start) + "ms");
      
   }

   /**
    * @param args
    */
   public static void main(String[] args) {
      PerformanceTest test = new PerformanceTest();
      test.setDialogBehaviour(SimpleGame.FIRSTRUN_OR_NOCONFIGFILE_SHOW_PROPS_DIALOG);
      
      LoggingSystem.getLoggingSystem().setLevel( Level.OFF );
      
      test.start();
   }

}

Hmm, just throwing this into my editor and running it, I get no errors.  (On xp though…)  Have you tried cranking down the number 8000 to 1 just to see it run?  That fact that it runs with no quads on screen doesn't really narrow things down much.

I'm rebooting into Windows XP in a bit. I'll let you know whether it runs there or not.

change

Quad q = new Quad("", 1f, 1f);



to

Quad q = new Quad("unique name", 1f, 1f);



???

No, I read somewhere on the forums that the name of the nodes etc aren't strictly necessary. The code works under Windows on the same system, so it must be something with the JNI's or the Mac OS X OpenGL implementation.