Skip to main content

Texture Color Table

Please note these forums are being decommissioned and use the new and improved forums at
No replies
Joined: 2011-04-12


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[j] = 0;

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


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 ?