pizzazhang
06-05-2011 10:59:02
Hi,
I want to implement my Mesh Editor using MOgre and WinForm. I read the Wiki Tutorial about embedding Ogre into WinForm and yes it does well only if a single WinForm. But when I use WeifenLuo.WinFormsUI.Docking to add the OgreRenderForm into the Dock Panel, I found no render thing, the OgreRenderForm is empty! To be more clear, I'll paste my code:
OgreRenderForm inherits form DockContent.
and OgreForm:
and the img:[attachment=0]mogre001.PNG[/attachment]
Anyone could help me? Thanks in advance!
I want to implement my Mesh Editor using MOgre and WinForm. I read the Wiki Tutorial about embedding Ogre into WinForm and yes it does well only if a single WinForm. But when I use WeifenLuo.WinFormsUI.Docking to add the OgreRenderForm into the Dock Panel, I found no render thing, the OgreRenderForm is empty! To be more clear, I'll paste my code:
public OgreRenderForm()
{
InitializeComponent();
this.Paint += new System.Windows.Forms.PaintEventHandler(this.OgreRenderForm_Paint);
this.Disposed += new EventHandler(OgreRenderForm_Disposed);
this.Size = new Size(800, 600);
Resize += new EventHandler(this.OgreRenderForm_Resize);
mogreWin = new OgreWindow(this.Handle);
mogreWin.InitMogre();
}
OgreRenderForm inherits form DockContent.
and OgreForm:
public OgreForm()
{
InitializeComponent();
this.Load += new EventHandler(this.OgreForm_Load);
}
private void OgreForm_Load(object sender, EventArgs e)
{
LogForm logForm = new LogForm();
logForm.Show(this.dockPanel1);
logForm.DockTo(this.dockPanel1, DockStyle.Left);
PropertyForm propertyForm = new PropertyForm();
propertyForm.Show(this.dockPanel1);
propertyForm.DockTo(this.dockPanel1, DockStyle.Left);
OgreRenderForm renderCanvas = new OgreRenderForm();
renderCanvas.Show(this.dockPanel1);
renderCanvas.DockTo(this.dockPanel1, DockStyle.Fill);
}
and the img:[attachment=0]mogre001.PNG[/attachment]
Anyone could help me? Thanks in advance!