Re: A problem with the textures.

Posted by gouessej on
URL: https://forum.jogamp.org/A-problem-with-the-textures-tp4025533p4025545.html

A Shape3D instance is created with a Geometry and an Appearance. If your Geometry is a GeometryArray, then you can set texture coordinates to it. In the example, a subclass of GeometryArray (QuadArray) is used:
polygon1.setTextureCoordinate (0, new Point2f(0.0f,0.0f));
polygon1.setTextureCoordinate (1, new Point2f(1.0f,0.0f));
polygon1.setTextureCoordinate (2, new Point2f(1.0f,1.0f));
polygon1.setTextureCoordinate (3, new Point2f(0.0f,1.0f));
Julien Gouesse | Personal blog | Website