It was OK, before I add this code.
protected override CreateParams CreateParams
{
get
{
CreateParams handleParam = base.CreateParams;
handleParam.ExStyle |= 0x02000000; // WS_EX_COMPOSITED
return handleParam;
}
}
I have to use this code, but I don't know how to remove flicker.
Is there any solution?
This is my code when sfml is shown
m_renderSurface
= new PictureBox
(); m_renderSurface
.Location = new System.Drawing.Point(0,
0); m_renderSurface
.Size = new System.Drawing.Size(m_parentPanel
.Size.Width, m_parentPanel
.Size.Height); m_parentPanel
.Controls.Add(m_renderSurface
); SFML
.Window.ContextSettings setting
= new SFML
.Window.ContextSettings(); setting
.AntialiasingLevel = 8; m_renderWindow
= new SFML
.Graphics.RenderWindow(m_renderSurface
.Handle, setting
); m_renderWindow
.SetVerticalSyncEnabled(true); m_renderWindow
.SetVisible(true); while (m_renderWindow
.IsOpen) { try { System.Windows.Forms.Application.DoEvents(); m_renderWindow
.DispatchEvents(); m_renderWindow
.Clear(colorWindow
); SetItems
(); DrawItems
(); m_renderWindow
.Display(); } catch { break; } }