public void SerializeContentMaterial(PRCMaterial t) { WriteUint32(PRCType.PRC_TYPE_GRAPH_Material); SerializeContentPRCBase(t); WriteUint32(t.ambient + 1); WriteUint32(t.diffuse + 1); WriteUint32(t.emissive + 1); WriteUint32(t.specular + 1); WriteDouble(t.shininess); WriteDouble(t.ambient_alpha); WriteDouble(t.diffuse_alpha); WriteDouble(t.emissive_alpha); WriteDouble(t.specular_alpha); }
public UInt32 addMaterial(PRCRgbColor color) { var index = addColor(color); var material = new PRCMaterial() { name = "", ambient = index, diffuse = index, emissive = index, specular = index, ambient_alpha = 1, diffuse_alpha = 1, emissive_alpha = 1, specular_alpha = 1, shininess = 1, }; _materials.Add(material); return((UInt32)_materials.Count - 1); }