示例#1
0
 /// <summary>Creates a material from a shader, and uses the shader's default settings.</summary>
 /// <param name="id">Set the material's id to this.</param>
 /// <param name="shader">Any valid shader.</param>
 public Material(string id, Shader shader)
 {
     _materialInst = NativeAPI.material_create(shader == null ? IntPtr.Zero : shader._shaderInst);
     NativeAPI.material_set_id(_materialInst, id);
 }
示例#2
0
 /// <summary>Creates a material from a shader, and uses the shader's default settings. Uses an auto-generated id.</summary>
 /// <param name="shader">Any valid shader.</param>
 public Material(Shader shader)
 {
     _materialInst = NativeAPI.material_create(shader == null ? IntPtr.Zero : shader._shaderInst);
 }