textures only showing in .setShowBounds(true, true

my texures only turn up when i get:
.setShowBounds(true, true);

anyone no what whats about?

This post is useless in many sences, but you might feel better that’s not only you having difficulties with texture :wink: I am having troubles with textures as well…

Right now, not even using .setShowBounds(true, true) works for me. I had them working before, so not sure what’s going on.

Having a look at the demos, to set up a shape with texture, we only need:

Texture2D texture;

aPlane = new Appearance();
aPlane.setPolygonAttributes(new PolygonAttributes(PolygonAttributes.POLYGON_FILL, PolygonAttributes.CULL_NONE, 0));
aPlane.setTexture(texture);
plane.setAppearance(aPlane);

But I’m getting a gray shape… hmm… not sure what’s going on.

Mine scenegraph is not simple one, so I cannot really see what’s going on. I have an “editing” scenegraph, and then I copy all the nodes of interest to a “playing” scenegraph, and change the appearances of certain shapes as adequate. The application creates a new canvas to view the “playing” scenegraph, but textures are not working, and having any shape which is different from QuadricSphere (implemented from a thread in this forum) makes the application crash. Very annoying stuff… and I’m trying to solve it now.

Ah, what’s the version of xith and jogl you’re running?
What kind of situation is yours roughly? Do you do any copying of nodes? The problem might be related to mine. I think in my case, there is some problem regarding the cloning of scenegraphobjects, since I might not sure if it’s good idea to have things being shared between two running views.

Can anyone clarify on that? If there two canvas, with two different universes but which share some appearances and shapes, is there any potential issue on that?

cheers :stuck_out_tongue:

Are you assigning a texture to the texture variable? I’ve been having problems with Appearances also, see my post about 10 posts down.

mine working now :slight_smile: seems i wasnt setting the texture to the defuse color. so when using .setShowBounds it was turning off the defuse and showing the texture on another layer.

sorted :slight_smile: but strange it worked at all.

Mine is working now too ;D

The problem was that some of my geometries didn’t have textured generated (the Utils.createSphere() method does not include texture coordinates, for instance).

Xith still rulez ::slight_smile:

EDIT: spelling