示例#1
0
 public void Render()
 {
     for (int i = 0; i < Material.PassCount; i++)
     {
         Material.Apply(i);
         PlatformRenderer.DrawTriangles(mesh, StartIndex, LastIndex - StartIndex);
     }
 }
示例#2
0
        private void Render(GameTime gameTime, IAether particle)
        {
            Matrix worldTransform;

            LeptonsManager.GetWorldTransform(particle, out worldTransform);

            IPhoton   photon   = particle as IPhoton;
            IMaterial material = (photon != null) ? photon.Material : null;

            if (photon != null && material != null)
            {
                ((IShaderMatrices)material).World      = worldTransform;
                ((IShaderMatrices)material).View       = this.View;
                ((IShaderMatrices)material).Projection = this.Projection;
                material.Apply();
                material.ApplyTextures(photon.Textures);
                photon.Accept(material);
                return;
            }

            return;
        }