rendered paste bodyprivate void frmMain_Load(object sender, EventArgs e)
{
SetStyle(ControlStyles.ResizeRedraw, true);
SetStyle(ControlStyles.Opaque, true);
MinimumSize = new System.Drawing.Size(Width - ClientSize.Width + 1,
Height - ClientSize.Height + 1);
presentParams.IsFullScreen = false;
presentParams.BackBufferCount = 1;
presentParams.SwapEffect = SwapEffect.Discard;
presentParams.BackBufferWidth = ClientSize.Width;
presentParams.BackBufferHeight = ClientSize.Height;
device = new GraphicsDevice(GraphicsAdapter.DefaultAdapter,
DeviceType.Hardware,
this.Handle,
presentParams);
//Странно, работает только если false
//device.SoftwareVertexProcessing = true;
}