Hello,

I wrote the next source code to creat a primitive:

 Sphere CreateSphere(){
  Sphere MySphere = new Sphere();
  MySphere.setPrimitiveFlags(Sphere.GENERATE_NORMALS |
Sphere.GENERATE_TEXTURE_COORDS);
  return MySphere;
 }

when a try to apply some texture it throws an exception naming:

javax.media.j3d.IllegalRenderingStateException: Cannot do texture
without specifying texture coordinates in geometry object

when I try the next function it works fine:

 Sphere CreateSphere(){
  Appearance ap =new Appearance();
   Sphere MySphere = new Sphere(1.0f, Sphere.GENERATE_NORMALS |
                                 Sphere.GENERATE_TEXTURE_COORDS |
Sphere.GENERATE_NORMALS_INWARD , ap);
  return MySphere;
 }

 but i need to implement the first function, the diference is only the
way to create my primitive.

If anyone can help me it would be much appreciated.


===================================
    Lee Harvey Urquijo Vanegas
 Laboratorio de Realidad Virtual
 http://arcadia.eafit.edu.co/lrv
   e-mail: [EMAIL PROTECTED]
    Celular: (033) 449-1562
  Apartado A�reo 80898 Envigado
        Universidad EAFIT
       Medell�n - Colombia
===================================


�����������������������
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 3D Home Page: http://java.sun.com/products/java-media/3D/

Reply via email to