Hi everybody,

I've got an IllegalRenderingStateException error when I run
my 3d applet....the full message is :

javax.media.j3d.IllegalRenderingStateException: Cannot do lighting without
specifying normals in geometry object
        at javax.media.j3d.RenderQueue.insert(RenderQueue.java:351)
        at javax.media.j3d.Traverser.insertRenderObjects(Traverser.java:599)
        at javax.media.j3d.Traverser.run(Traverser.java:2111)

I don't understand what's wrong....what is "normals" in
geometry object...

here is the geometry of the object3D (4 Point3 which give a plane) :

  protected Geometry createGeometry(Point3d array[]) {
      GeometryInfo gi = new GeometryInfo(GeometryInfo.QUAD_ARRAY);
      gi.setCoordinates(array);

      // set up the texture coordinates
      Point2f[] array_texture = new Point2f[4] ;
      array_texture[1] = new Point2f(1.0f, 1.0f);
      array_texture[0] = new Point2f(0.0f, 1.0f);
      array_texture[3] = new Point2f(0.0f, 0.0f);
      array_texture[2] = new Point2f(1.0f, 0.0f);
      gi.setTextureCoordinates(array_texture);

      NormalGenerator ng = new NormalGenerator();
      ng.generateNormals(gi);

      GeometryArray result = gi.getGeometryArray();

      result.setCapability(LineStripArray.ALLOW_COUNT_READ);
      result.setCapability(LineStripArray.ALLOW_COLOR_WRITE);

      return result;
  }

If somebody know what's wrong, I'll appreciate
some help.

PS: I runned this program before on another PC with the
same version of Java and I didn't have any error....

Thanks, brice

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to