Ejemplo n.º 1
0
 public void setMaterial(Material m)
 {
     material=m;
 }
Ejemplo n.º 2
0
 public void addMaterial(string key, Material m)
 {
     materialData.Add(key, m);
 }
Ejemplo n.º 3
0
        // Material loader
        public void loadMaterial(Material material)
        {
            color = material.color;
            transparency = material.transparency;
            reflectivity = material.reflectivity;
            texture = material.texture;
            if (material.envmap != null) envmap = material.envmap.pixel;
            else envmap = null;

            if (texture != null)
            {
                tw = texture.width - 1;
                th = texture.height - 1;
                tbitW = texture.bitWidth;
                tbitH = texture.bitHeight;
            }

            mode = 0;
            if (!material.flat) mode |= P;
            if (envmap != null) mode |= E;
            if (texture != null) mode |= T;
            if (material.wireframe) mode |= W;
            materialLoaded = true;
            ready = lightmapLoaded && materialLoaded;
        }