1 (edited by danman 2007-12-21 17:55:57)

Topic: texturewrap?

Hi, anyone know why texturewrap is "not found"?

b.getmaterial(0).gettexture(0).TextureWrap(0) = irr.video.ETC_CLAMP;
b.getmaterial(0).TextureWrap(0) = irr.video.ETC_CLAMP;
b.setMaterialFlag(ETC_CLAMP, true)



none of these work hmm



Here is the whole thing:

Function createbackground:iscenenode()
        Local b:ianimatedmeshscenenode=smgr.addanimatedMeshSceneNode( smgr.getMesh("media/bkgplanes.b3d") )
        b.setposition (_vector3df(320,240,1000))
        Local w=88
        b.SetScale(_vector3df(w,w*0.75,1))    
        b.setMaterialFlag(EMF_TEXTURE_WRAP, True)
        b.getmaterial(0).TextureWrap(0) = irr.video.ETC_CLAMP_EDGES;
        Return b
End Function

backplanes.b3d is a set of 4 welded quads in a row with 4 textures making up a scrolling background and i need to get rid of the ugly lines.
One more (unrelated) question, why cant i use meshscene node rather than animatedmeshscenenode when loading a b3d?

Re: texturewrap?

greetings smile  i dont have the mod with me right now but check for a setTextureWrap method.  the B3D loader returns an animatedmeshscenenode.

Re: texturewrap?

Any update about the missing "TextureWrap" method?

Re: texturewrap?

greetings smile the TextureWrap property is only on the SMaterialLayer type.   for SMaterialLayer there are setTextureWrap and getTextureWrap to access the property.  for things that return an SMaterial you would use the setFlag and getFlag methods.  you can also call setMaterialFlag on an ISceneNode instance to set all materials at once.

Re: texturewrap?

ah, thank you!