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


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);

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(
   at org.lwjgl.opengl.Display.update(
   at com.jme.renderer.lwjgl.LWJGLRenderer.displayBackBuffer(Unknown Source)
   at Source)
   at nl.tygron.varx.PerformanceTest.main(

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

MacBook Pro Intel Core Due 2.0
Mac OS X 10.4.6
ATI Radeon x1600

import java.util.logging.Level;

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

public class PerformanceTest extends SimpleGame {

   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);
      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();
      LoggingSystem.getLoggingSystem().setLevel( Level.OFF );


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.


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


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.