terrachild
26-09-2007 14:22:22
I'm trying to get the following code to work in VB.NET with mogre:
LogManager.Singleton.LogMessage("*** Initializing OIS ***")
Dim pl As MOIS.ParamList = New MOIS.ParamList()
Dim windowHnd As IntPtr
WINDOW.GetCustomAttribute("WINDOW", windowHnd)
pl.Insert("WINDOW", windowHnd.ToString())
inputManager = MOIS.InputManager.CreateInputSystem(pl)
'Create all devices (We only catch joystick exceptions here, as, most people have Key/Mouse)
inputKeyboard = inputManager.CreateInputObject(MOIS.Type.OISKeyboard, False)
inputMouse = inputManager.CreateInputObject(MOIS.Type.OISMouse, False)
But the line: WINDOW.GetCustomAttribute("WINDOW", windowHnd) cause an error that says: Object reference not set to an instance of an object
Not sure what to do.
Window is defined earlier as: Public WINDOW As RenderWindow
Thanks.
LogManager.Singleton.LogMessage("*** Initializing OIS ***")
Dim pl As MOIS.ParamList = New MOIS.ParamList()
Dim windowHnd As IntPtr
WINDOW.GetCustomAttribute("WINDOW", windowHnd)
pl.Insert("WINDOW", windowHnd.ToString())
inputManager = MOIS.InputManager.CreateInputSystem(pl)
'Create all devices (We only catch joystick exceptions here, as, most people have Key/Mouse)
inputKeyboard = inputManager.CreateInputObject(MOIS.Type.OISKeyboard, False)
inputMouse = inputManager.CreateInputObject(MOIS.Type.OISMouse, False)
But the line: WINDOW.GetCustomAttribute("WINDOW", windowHnd) cause an error that says: Object reference not set to an instance of an object
Not sure what to do.
Window is defined earlier as: Public WINDOW As RenderWindow
Thanks.