Code: Select all
'delcare a new irr device
Dim device As IrrlichtDevice
device = New IrrlichtDevice(DriverType.DIRECTX9)
'set the app window caption
device.WindowCaption() = "DungeonKeep"
'load the texture
Dim images As ITexture = device.VideoDriver.GetTexture("media/2ddemo.bmp")
device.VideoDriver.MakeColorKeyTexture(images, New Position2D(0, 0))
While (device.Run())
If (device.WindowActive) Then
device.VideoDriver.BeginScene(True, True, New Color(255, 0, 0, 50))
device.SceneManager.DrawAll()
device.GUIEnvironment.DrawAll()
device.VideoDriver.Draw2DImage(images, New Position2D(50, 50), _
New Rect(0, 0, 342, 224), New Color(255, 255, 255, 255), True)
device.VideoDriver.EndScene()
End If
device.CloseDevice()
End While
End Sub