示例#1
0
        public void AddInstancedRenderItem(ModelMesh mesh, RenderableComponent renderable, MeshEffect effect)
        {
            if (!InstanceData.TryGetValue(mesh, out var instanceData))
            {
                InstanceData.Add(mesh, instanceData = new RenderInstanceData(mesh));

                mesh.BuildRenderList(this, instanceData, effect);
            }

            instanceData.InstancedRenderables.Add(new InstancedRenderable(renderable));
        }