hi,
i tried this:
this is not crashing but i am getting a grey screen
Try
If device Is Nothing Then
device = New IrrlichtDevice(Irrlicht.Video.DriverType.OPENGL, New Dimension2D(c.Width, c.Height), 32, False, False, False, True, c.Handle)
End If
Catch ex As Exception
End Try
Try
If device Is Nothing Then
device = New IrrlichtDevice(Irrlicht.Video.DriverType.DIRECT3D9, New Dimension2D(c.Width, c.Height), 32, False, False, False, True, c.Handle)
End If
Catch ex As Exception
End Try
Try
If device Is Nothing Then
device = New IrrlichtDevice(Irrlicht.Video.DriverType.DIRECT3D8, New Dimension2D(c.Width, c.Height), 32, False, False, False, True, c.Handle)
End If
Catch ex As Exception
End Try
----------------------------
on this machine when i use this directly the application works:
device = New IrrlichtDevice(Irrlicht.Video.DriverType.OPENGL, New Dimension2D(c.Width, c.Height), 32, False, False, False, True, c.Handle)
any idea why that is happening?
driver problem..
I believe you need to declare a video driver also
and then
and then in your loop
This renders mine with a blue backdrop. Hope this works, I'm very new to this so I'm not sure if this is what you where needing help with.
Code: Select all
Private driver As Irrlicht.Video.IVideoDriver
Code: Select all
Try
If device Is Nothing Then
device = New IrrlichtDevice(Irrlicht.Video.DriverType.OPENGL, New Dimension2D(c.Width, c.Height), 32, False, False, False, True, c.Handle)
driver = device.videodriver
End If
Catch ex As Exception
End Try
Code: Select all
While RenderingDevice.device.Run()
If RenderingDevice.device.WindowActive Then
RenderingDevice.device.VideoDriver.BeginScene(True, True, New Color(0, 100, 100, 255))
RenderingDevice.device.SceneManager.DrawAll()
RenderingDevice.device.GUIEnvironment.DrawAll()
RenderingDevice.device.VideoDriver.EndScene()
End If
End While
''shutdown the renderer
RenderingDevice.device.CloseDevice()