I have a scene graph and a texture2d attribute set at some appearance down the hierarchy. How
do I overwrite this texture to have no texture at a child?
Texture2d overwrite
Re: Texture2d overwrite
Basically one needs to set an appearance attribute in the appearance where you want to turn off the texturing that looks like:
I've added some code to the tutorial example de.jreality.tutorial.app.TextureExample which illustrates how to do this and checked it into the svn repository.
Ideally, (IMHO) there would be a method in TextureUtility class which hides this from the user, on a par with the method TextureUtility.createTexture(...). Something like TextureUtility.disableTexture(...). If that gets done, will update this thread.
Code: Select all
ap.setAttribute("polygonShader.texture2d", Appearance.INHERITED);
Ideally, (IMHO) there would be a method in TextureUtility class which hides this from the user, on a par with the method TextureUtility.createTexture(...). Something like TextureUtility.disableTexture(...). If that gets done, will update this thread.
jReality core developer