void Setup()
{
var gd = GraphicsDevice;
gd.BlendState = _blendState;
gd.DepthStencilState = _depthStencilState;
gd.RasterizerState = _rasterizerState;
gd.SamplerStates[0] = _samplerState;
// Setup the default sprite effect.
var vp = gd.Viewport;
Matrix projection;
Matrix.CreateOrthographicOffCenter(0, vp.Width, vp.Height, 0, -1, 0, out projection);
#if !DIRECTX
// GL requires a half pixel offset to match DX.
projection.M41 += -0.5f * projection.M11;
projection.M42 += -0.5f * projection.M22;
#endif
Matrix.Multiply(ref _matrix, ref projection, out projection);
_matrixTransform.SetValue(projection);
_spritePass.Apply();
}