예제 #1
0
        public void Draw(Quad vertexQuad, Color4 colour, RectangleF?textureRect = null, VertexBatch <TexturedVertex2D> spriteBatch = null, Vector2?inflationPercentage = null)
        {
            if (TextureGL == null || !TextureGL.Bind())
            {
                return;
            }

            TextureGL.Draw(vertexQuad, textureBounds(textureRect), colour, spriteBatch, inflationPercentage);
        }
예제 #2
0
        public void Draw(Quad vertexQuad, ColourInfo colour, RectangleF?textureRect = null, Action <TexturedVertex2D> vertexAction = null, Vector2?inflationPercentage = null)
        {
            if (TextureGL == null || !TextureGL.Bind())
            {
                return;
            }

            TextureGL.Draw(vertexQuad, textureBounds(textureRect), colour, vertexAction, inflationPercentage);
        }
예제 #3
0
        public void Draw(Quad vertexQuad, Color4 colour, RectangleF?textureRect = null, VertexBatch <TexturedVertex2d> spriteBatch = null)
        {
            RectangleF texRect = textureRect ?? new RectangleF(0, 0, DisplayWidth, DisplayHeight);

            if (DpiScale != 1)
            {
                texRect.Width  *= DpiScale;
                texRect.Height *= DpiScale;
                texRect.X      *= DpiScale;
                texRect.Y      *= DpiScale;
            }

            TextureGL?.Draw(vertexQuad, texRect, colour, spriteBatch);
        }