示例#1
0
 internal static Material GetMaterial(GUIMaterial matDef)
 {
     if (!MaterialCache.ContainsKey(matDef.ID))
     {
         Material mat = new Material();
         mat.DefaultDiffuseFormat = TextureInfo.TextureFormats.Sprite;
         mat.DiffuseColor         = matDef.Color;
         mat.DiffuseName          = matDef.Texture;
         MaterialCache.Add(matDef.ID, mat);
     }
     return(MaterialCache[matDef.ID]);
 }
示例#2
0
 protected SingleDrawGUIItem(RelativeRect rect, Color color, string textureName) : base(rect)
 {
     DefaultMaterial = new GUIMaterial(textureName, color);
 }