Texture2d overwrite

Have jReality programming problems or questions? Post them here.
Post Reply
sechel
Posts: 69
Joined: Tue 2. Oct 2007, 09:20

Texture2d overwrite

Post by sechel » Mon 6. Dec 2010, 13:05

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?

User avatar
gunn
Posts: 323
Joined: Thu 14. Dec 2006, 09:56
Location: TU Berlin
Contact:

Re: Texture2d overwrite

Post by gunn » Mon 13. Dec 2010, 17:29

Basically one needs to set an appearance attribute in the appearance where you want to turn off the texturing that looks like:

Code: Select all

   		ap.setAttribute("polygonShader.texture2d", Appearance.INHERITED);
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.
jReality core developer

Post Reply