David,

    Bug# 4392047 has been filed for this bug. In the meantime,
    you can pass the texture coordinate as float. This should work.

    float texCoord[] = {texX, texZ};
    triangles.setTextureCoordinate(0,vertex,texCoord);

-Charmaine

Java3D Engineering Team




> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> X-Priority: 3
> X-MSMail-Priority: Normal
> X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
> Date: Tue, 21 Nov 2000 21:28:56 -0500
> From: David <[EMAIL PROTECTED]>
> Subject: [JAVA3D] Multi-texture question
> To: [EMAIL PROTECTED]
>
> I am getting a null pointer exception when I try to set a texture coordinate
> for unit state 0.  When I created the triangle strip array I asked for two
> texture sets like this:
>
>   public TriangleStripArray getGeometryDefinition( int vertexPoints, int
> perStrip[] ) {
>
>       Log.log.println(LogType.EXHAUSTIVE,"Creating multitexture geometry");
>       int texMapping[] = {0,1,1};
>
>   return new TriangleStripArray(vertexPoints,
>    GeometryArray.COORDINATES |
>    GeometryArray.NORMALS |
>    GeometryArray.TEXTURE_COORDINATE_2 |
>    GeometryArray.COLOR_3,
>          2,
>          texMapping,
>          perStrip);
>
>    }
>
>
> Later I try to set the texture coordinates for a single vertex like this:
>
>       triangles.setTextureCoordinate(0,vertex,new TexCoord2f(texX,texZ));
>       triangles.setTextureCoordinate(1,vertex,new
> TexCoord2f(texX/density,texZ/density));
>
> In the only example of this I could find, they were calculating an array of
> floats and just setting the entire unit state texture coords like this:
>
> // specify texture coordinates for texture coordinate set 0
> >         geo.setTextureCoordinates(0, 0, texCoordSet0);
> >
> >         // specify texture coordinates for texture coordinate set 1
> >         geo.setTextureCoordinates(1, 0, texCoordSet1);
>
>
> Am I missing something?  I am trying to multi texture a detail texture over
> another texture.
>
> Dave Yazel
> Cosm Development Team
>
> ===========================================================================
> 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".

===========================================================================
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