public void Draw(Matrix View, Matrix Projection, Vector3 Up, Vector3 Right)
{
// Set the vertex and index buffer to the graphics card
graphicsDevice.SetVertexBuffer(verts);
graphicsDevice.Indices = ints;
graphicsDevice.BlendState = BlendState.AlphaBlend;
setEffectParameters(View, Projection, Up, Right);
if (EnsureOcclusion)
{
drawOpaquePixels();
drawTransparentPixels();
}
else
{
graphicsDevice.DepthStencilState = DepthStencilState.DepthRead;
effect.Parameters["AlphaTest"].SetValue(false);
drawBillboards();
}
// Reset render states
graphicsDevice.BlendState = BlendState.Opaque;
graphicsDevice.DepthStencilState = DepthStencilState.Default;
// Un-set the vertex and index buffer
graphicsDevice.SetVertexBuffer(null);
graphicsDevice.Indices = null;
}