<%@ Language=JavaScript %> DDDengine documentation

void __stdcall SetMeshMaterial(int mesh,int text1,int text2,int effect,DWORD ambient,float amount,bool u1,bool v1,bool u2,bool v2,float alpha)
 

    Specify the features of materail of the mesh.

                mesh: id of mesh

                text1: id of first (main) texture of this mesh. If it is -1, so it does not modify the original value.

                text2: id of secound texture for multitexture effects.If it is -1, so it does not modify the original value.

                effects:

                                If it is -1, so it does not modify the original value.  Shader, and effect can be used together.:

                                SHADER_NONE     0 : this mesh has no effect

                                SHADER_MULITEXTURE 0x100: both textures will show on this mesh.

                                SHADER_BUMP 0x200 : Standard UV bump.

                                SHADER_BUMPDOT3 0x300  : Normal map.

                                SHADER_BUMPWATER 0x400 : It uses a pregenerated bump map to simulate the wet surface.

 

                                EFFECT_BUMPWAVE 1: mesh will be wet with water effect, it uses the second  texture to wave.  //Not supported in this version 

                                EFFECT_ENVSPHERE 4: with sphere environment mapping by vertex normals

                                EFFECT_MIRROR 8: with environment mapping by vertex positions.

                                EFFECT_OCEANFLOOR 16 : Oceanfloor effect on vertex color, it clear the vertex color data.

                                EFFECT_ENVCUBIC :  with cubic environment mapping by vertex positions   //Not supported in this version 

                                notes: some effect is not supported on old video cards, so you will not see ths effects on the faces.

                ambient,amount: It is not supported now. It can be ZERO.

                u1,v1:  Texture is tiled in u and v direction on first texture.

                u2,v2:  Texture is tiled in u and v direction on second texture.

                Meshalpha:  0-1. 1 is the solid.