예제 #1
0
        int IScreen.Draw(DrawContext drawContext)
        {
            drawContext.Camera = this.Camera;
            var transform = Transform.Identity;

            // PreDraw
            foreach (var preDrawable in this.GetPreDrawables(this.Scene))
                preDrawable.PreDraw(drawContext);

            // Init draw
            if (((IScreen)this).UseLinearSampler)
                drawContext.UseLinearSampler();
            else
                drawContext.UsePointSampler();

            // Draw scene
            var total = this.Scene.Draw(drawContext, transform);

            // Finally draw this Screen
            return total + this.Draw(drawContext, transform);
        }