I'm trying to put some textures on QuadArrays and the problem is...my texture is a pretty detailed .jpg picture of a brickwall, but the result on the geometry is just an ungly red color. It's the same thing when I try to put a stonetexture on the floor, the result is just a grey color, covering the entire floor.
is it the mipmapmode? I use BASE_LEVEL but that should give me a nice texture, shouldn't ti??
thanx a lot Flavius
here's the code I use: -------------------------------------------------------- //create the shape3d objects Shape3D shapeGolv = new Shape3D(golv); Shape3D shapeVagg = new Shape3D(vagg);
//load the textures TextureLoader loader = new TextureLoader("texturer\\rock.jpg", this); //laod first texture ImageComponent2D imgRock = loader.getImage(); //save it as image TextureLoader loader2 = new TextureLoader("texturer\\brick.jpg", this); //load second texture ImageComponent2D imgBrick = loader2.getImage(); //save it as image
//put the images in texture2d objects Texture2D brick = new Texture2D(Texture.BASE_LEVEL, Texture.RGB, 256, 128); //create the texture objects Texture2D rock = new Texture2D(Texture.BASE_LEVEL, Texture.RGB, 256, 128); brick.setImage(0, imgBrick); brick.setEnable(true); rock.setImage(0, imgRock); rock.setEnable(true); Appearance appVagg = new Appearance(); //create appearance Appearance appGolv = new Appearance(); appVagg.setTexture(brick); appGolv.setTexture(rock);
shapeGolv.setAppearance(appGolv); shapeVagg.setAppearance(appVagg);
_________________________________________________________________ Hitta rätt på nätet med MSN Sök http://search.msn.se/
=========================================================================== 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".