Exemple #1
0
        internal static RenderItem Create(Material material, Mesh mesh, int subMeshIndex, Transform t)
        {
            RenderItem item;

            // TODO: Select actural render item based on what material we are using
            item = new RenderItem<VertexPositionNormalTexture>(material, AddVertexPositionNormalTexture);

            item.Transform = t;
            item.Priority = material.shader.renderQueue;
            item.AddMesh(mesh, t.world, subMeshIndex);
            item.name = String.Format("{0} - {1} on {2} rendering {3}", item.Priority, item.Material.name, t.ToString(), mesh.name);

            return item;
        }