0 Replies Latest reply: Apr 12, 2011 10:03 AM by 825283 RSS

    Texture Color Table

    825283
      Hello,

      I need some help on how to use the setTextureColorTable(int[][] table) in TextureAttributes.

      Here is a part of the code I tried :

      TextureAttributes      texAttr = new TextureAttributes();

      int[][] table = new int[4][256];

           for (int i = 0; i < 4; i++) {
                for (int j = 0; j < 100; j++) {
                     table[i][j] = 0;
                }
           }
           

           for (int i = 0; i < 4; i++) {
                for (int j = 100; j < 256; j++) {
                     table[i][j] = j;
                }
           }
           
           texAttr.setTextureColorTable(table);
           texAttr.setTextureMode(TextureAttributes.BLEND);

      I think the method was ignored because the result I got did not change from before.
      I saw on the javadoc that If the texture color table size is greater than the device-dependent maximum texture color table size for a particular Canvas3D, the texture color table is ignored for that canvas. How can I change that ?

      Thanks for th help.