Ejemplo n.º 1
0
        internal void Draw()
        {
            lock (BaseCanvas.RazorLock)
            {
                // Prepare Canvas to draw
                _prepareCanvas();
                // Draw bg texture
                _drawBg();
                // Draw GameObjects textures
                _drawGameObjects();
                // Draw Rectangles
                _drawRects();
                // Call Scene OnDraw method
                OnDraw(BaseCanvas.RazorGFX);
                // Call Lightning calc and draw
                //_calcLights();

                // Call Tint Scene pseudo-shader
                _tint();
                // Call UI draw
                _drawUi();
                // Call Debugger draw
                _drawDebug();

                // ------ RENDER ------
                BaseCanvas.RazorPaint();
            }
        }
 internal void Draw()
 {
     lock (BaseCanvas.RazorLock)
     {
         BaseCanvas.RazorGFX.InterpolationMode = TextureInterpolationMode;
         BaseCanvas.RazorGFX.Clear(this.BackColor);
         if (this.BackgroundTexture != null)
         {
             DrawTexture(BackgroundTexture, 0, 0, this.Width, this.Height);
         }
         foreach (var gObj in GameObjects)
         {
             if (gObj.CurrentTexture != null)
             {
                 DrawGameObjectTexture(gObj);
             }
         }
         if (tinter.Width != 0 && tinter.Height != 0)
         {
             BaseCanvas.RazorGFX.FillRectangle(tintBrush, tinter);
         }
         BaseCanvas.RazorPaint();
     }
 }