Ejemplo n.º 1
0
        public void Render(int startIndex, int count)
        {
            MaterialFactory.GetMaterial(
                PlatformRenderer.Blending,
                PlatformRenderer.ZTest,
                PlatformRenderer.ZWrite,
                PlatformRenderer.Shader,
                PlatformRenderer.Textures[0],
                PlatformRenderer.Textures[1]
                ).SetPass(0);
            // unityMesh.Clear(true);
            UploadVertices();
            var indices = new int[count];

            Array.Copy(source.Indices, startIndex, indices, 0, count);
            unityMesh.triangles = indices;
            PlatformRenderer.SetViewportAndProject();
            UnityEngine.Graphics.DrawMeshNow(unityMesh, UnityEngine.Matrix4x4.identity);
        }