I have successfully done the tutorial with the console app.
But how would one go about making it work in a "windows form"?
I would like to be able to use the normal form buttons and sliders and such to make my UI.
ClOgre is only for Visual Basic.
(By the way - now I remember that we wanted to rename ClOgre)
In Mogre tutorial 6 will be shown how to integrate Mogre to a Windows Form (with C#):
In my application I use the common GUI elements of Windows Forms. It's not so flexible and nice like an Ogre GUI system, but very easy to use.
As a DLL clOgre can be use with any language, as if, of course bu as a tutorial, yes is for VB.
I just want to know how to use windows form with mogre.
One basic form for the graphics.
(or picturebox, or whatever)
I do not understand how to do this.
I've looked at tutorial 6, but still i can't get it..
Any sample projects floating around somewhere?
I added a Panel to the Form and there the picture will be shown.
In my application I found this lines of code.
this.renderpanel is the Panel in the Form.
Maybe it helps you.
// Create Render Window
root.Initialise(false, "Main Ogre Window");
NameValuePairList misc = new NameValuePairList();
misc["externalWindowHandle"] = this.renderPanel.Handle.ToString();
RenderWindow renderWindow = root.CreateRenderWindow("Main RenderWindow", 1024, 768, false, misc);
// ... (load ressources, create camera) ...
// Create ViewPort
Viewport viewport = renderWindow.AddViewport(camera);
I use VB - so i just convert this code to VB with:
the resulting VB code is :
' Create Render Window
root.Initialise(False, "Main Ogre Window")
Dim misc As New NameValuePairList()
misc("externalWindowHandle") = Me.renderPanel.Handle.ToString()
Dim renderWindow As RenderWindow = root.CreateRenderWindow("Main RenderWindow", 1024, 768, False, misc)
' ... (load ressources, create camera) ...
' Create ViewPort
Dim viewport As Viewport = renderWindow.AddViewport(camera)
I'll try to get this to work now..
oh, what a nice converter tool
Good luck with the code. I'm away for about one week. Maybe later I could help with questions.