Ejemplo n.º 1
0
 /// <summary>Set texture for a material map type (MAP_DIFFUSE, MAP_SPECULAR...)</summary>
 public static void SetMaterialTexture(ref Material material, MaterialMapIndex mapType, Texture2D texture)
 {
     fixed(Material *p = &material)
     {
         SetMaterialTexture(p, mapType, texture);
     }
 }
Ejemplo n.º 2
0
 public static void SetMaterialTexture(ref Model model, int materialIndex, MaterialMapIndex mapIndex, ref Texture2D texture)
 {
     SetMaterialTexture(&model.materials[materialIndex], mapIndex, texture);
 }
Ejemplo n.º 3
0
 public static Texture2D GetMaterialTexture(ref Model model, int materialIndex, MaterialMapIndex mapIndex)
 {
     return(model.materials[materialIndex].maps[(int)mapIndex].texture);
 }
Ejemplo n.º 4
0
        public unsafe static void SetMaterialTexture(ref Model model, int materialIndex, MaterialMapIndex mapIndex, ref Texture2D texture)
        {
            Material *materials = (Material *)model.materials.ToPointer();

            Raylib.SetMaterialTexture(ref materials[materialIndex], (int)mapIndex, texture);
        }