2015-03-30 04:54 PM
API_Attribute attrib; API_RGBColor rgbC; short ltypeIndex; GSErrCode err; BNZeroMemory (&attrib, sizeof (API_Attribute)); BNZeroMemory (&rgbC, sizeof (API_RGBColor)); attrib.header.typeID = API_MaterialID; rgbC.f_red = 1.0; rgbC.f_green = 0.0; rgbC.f_blue = 0.0; //SetOption attrib.material.ambientPc = 66; attrib.material.diffusePc = 90; //Color Mode //attrib.material.emissionRGB = rgbC; //Select picture GS::UniString tmp ("material_pic"); GS::ucsncpy (attrib.material.texture.texName, tmp.ToUStr(), 100 / sizeof (GS::UniChar) - 1); //Set name sprintf (attrib.material.head.name, "material_test"); err = ACAPI_Attribute_Create (&attrib, NULL);