Code: Select all
Private Sub startirr(ByVal c As Control)
device = New IrrlichtDevice(Irrlicht.Video.DriverType.DIRECT3D9, New Dimension2D(c.Width, c.Height), 32, False, False, False, True, c.Handle)
Dim cam As ICameraSceneNode = device.SceneManager.AddCameraSceneNode(Nothing, New Vector3D, New Vector3D, -1)
Dim anim As ISceneNodeAnimator = device.SceneManager.CreateFlyCircleAnimator(New Vector3D(0, 10, 0), 30.0F, 0.003F)
cam.AddAnimator(anim)
' draw everything
' Note, using device.WindowActive will not work on a control, since we don't
' really activate controls..
While device.Run AndAlso c.Enabled
device.VideoDriver.BeginScene(True, True, New Irrlicht.Video.Color(255, 0, 0, 50))
device.SceneManager.DrawAll()
device.GUIEnvironment.DrawAll()
device.VideoDriver.EndScene()
End While