// Use this array of commands to show a triangle with texture....
static int[] command = {
Graphics3D.COMMAND_LIST_VERSION_1_0,
Graphics3D.PRIMITVE_TRIANGLES |
Graphics3D.PDATA_NORMAL_PER_FACE |
Graphics3D.PDATA_TEXURE_COORD |
Graphics3D.PATTR_LIGHTING |
Graphics3D.PATTR_SPHERE_MAP |
Graphics3D.PATTR_BLEND_HALF |
(1<<16), // Nbr of primitives, in this case just one triangle
0, 0, 0, // The triangle's ccordinates
200, 0, 0,
0, 200, 0,
0, 0, 4096, // The Normal
0,255,255,255, 0, 0, // The coordinates for the texture
Graphics3D.COMMAND_END, };
...
protected void paint(Graphics g) {
...
g3.drawCommandList( mainTexture, 0, 0, layout, effect, command);
...
}