public RenderPathCommand(RenderCommandType type) { BlendMode = BlendMode.Replace; Enabled = 1; UseLitBase = 1; Type = type; //default values: Tag = default(UrhoString); SortMode = RenderCommandSortMode.Fronttoback; Pass = default(UrhoString); PassIndex = 0; Metadata = default(UrhoString); PixelShaderName = default(UrhoString); VertexShaderName = default(UrhoString); PixelShaderDefines = default(UrhoString); VertexShaderDefines = default(UrhoString); TextureName0 = default(UrhoString); TextureName1 = default(UrhoString); TextureName2 = default(UrhoString); TextureName3 = default(UrhoString); TextureName4 = default(UrhoString); TextureName5 = default(UrhoString); TextureName6 = default(UrhoString); TextureName7 = default(UrhoString); #if !IOS && !ANDROID TextureName8 = default(UrhoString); TextureName9 = default(UrhoString); TextureName10 = default(UrhoString); TextureName11 = default(UrhoString); TextureName12 = default(UrhoString); TextureName13 = default(UrhoString); TextureName14 = default(UrhoString); TextureName15 = default(UrhoString); #endif ShaderParameters = default(HashBase); Outputs = default(VectorBase); DepthStencilName = default(UrhoString); ClearFlags = 0; ClearColor = default(Color); ClearDepth = 0; ClearStencil = 0; UseFogColor = 0; MarkToStencil = 0; VertexLights = 0; EventName = default(UrhoString); }
public void SetTextureName(TextureUnit unit, string name) { UrhoString nameStr = new UrhoString(name); switch (unit) { case TextureUnit.Diffuse: TextureName0 = nameStr; break; case TextureUnit.Normal: TextureName1 = nameStr; break; case TextureUnit.Specular: TextureName2 = nameStr; break; case TextureUnit.Emissive: TextureName3 = nameStr; break; case TextureUnit.Environment: TextureName4 = nameStr; break; case TextureUnit.Volumemap: TextureName5 = nameStr; break; case TextureUnit.Custom1: TextureName6 = nameStr; break; case TextureUnit.Custom2: TextureName7 = nameStr; break; #if !IOS && !ANDROID case TextureUnit.Lightramp: TextureName8 = nameStr; break; case TextureUnit.Lightshape: TextureName9 = nameStr; break; case TextureUnit.Shadowmap: TextureName10 = nameStr; break; case TextureUnit.Faceselect: TextureName11 = nameStr; break; case TextureUnit.Indirection: TextureName12 = nameStr; break; case TextureUnit.Depthbuffer: TextureName13 = nameStr; break; case TextureUnit.Lightbuffer: TextureName14 = nameStr; break; case TextureUnit.Zone: TextureName15 = nameStr; break; #endif default: throw new InvalidOperationException("Invalid texture unit"); } }