/// <summary>
        /// Adds a quad or image to the current batch of unrendered quads. If there is a state change,
        /// all previous quads are rendered at once, and the batch is reset. Note that the values for
        /// alpha and blend mode are taken from the current render state, not the quad.
        /// </summary>
        public void BatchQuad(Quad quad)
        {
            float  alpha           = _stateStackTop.Alpha;
            uint   blendMode       = _stateStackTop.BlendMode;
            Matrix modelViewMatrix = _stateStackTop.ModelViewMatrix;

            if (_quadBatchTop.IsStateChange(quad.Tinted, quad.Texture, alpha, quad.PremultipliedAlpha, blendMode, 1))
            {
                FinishQuadBatch();
            }

            _quadBatchTop.AddQuad(quad, alpha, blendMode, modelViewMatrix);
        }