FerretEngine/src/Graphics/FeDraw.cs
/// <summary>
/// Draw a sprite on screen.
/// </summary>
/// <param name="sprite"></param>
/// <param name="position"></param>
Draw a sprite on screen.
Draw a sprite on screen .
[MethodImpl(MethodImplOptions.AggressiveInlining)]
        public static void Sprite(Sprite sprite, Vector2 position)
        {
            Assert.IsTrue(FeGraphics.IsRendering);
            if (!WillRender(sprite, position, Vector2.One))
                return;
            FeGraphics.BindMaterial();
            FeGraphics.SpriteBatch.Draw(
                    sprite.Texture,
                    position - sprite.Origin,
                    sprite.ClipRect,
                    Color.White
                );
        }
[ MethodImpl ( MethodImplOptions . AggressiveInlining ) ] public static void Sprite ( Sprite sprite , Vector2 position ) { Assert . IsTrue ( FeGraphics . IsRendering ) ; if ( ! WillRender ( sprite , position , Vector2 . One ) ) return ; FeGraphics . BindMaterial ( ) ; FeGraphics . SpriteBatch . Draw ( sprite . Texture , position - sprite . Origin , sprite . ClipRect , Color . White ) ; }
Draw a sprite on screen.
Draw a sprite on screen .
sprite
Sprite
None
position
Vector2
None