Code: Select all
Imports IrrlichtNETCP
Imports IrrlichtNETCP.Inheritable
Module Main
Dim device As IrrlichtDevice
Sub Main()
Dim dt As DriverType = DriverType.Direct3D8
Dim aa As Boolean = True
Dim width As Integer = My.Computer.Screen.Bounds.Width
Dim height As Integer = My.Computer.Screen.Bounds.Height
Dim colourdepth As Integer = 32
Dim img As String = "C:/mypicture.png"
device = New IrrlichtDevice(dt, New Dimension2D(width, height), colourdepth, True, True, True, aa)
Dim smgr As SceneManager = device.SceneManager
Dim driver As VideoDriver = device.VideoDriver
Dim rectangle As IrrlichtNETCP.BillboardSceneNode = smgr.AddBillboardSceneNode(smgr.RootSceneNode, New Dimension2Df(width, height), 1)
rectangle.Position = New Vector3D(0, 0, 550)
rectangle.SetMaterialType(MaterialType.TransparentAddColor)
rectangle.SetMaterialTexture(0, driver.GetTexture(img))
rectangle.SetMaterialFlag(MaterialFlag.Lighting, False)
rectangle.SetMaterialFlag(MaterialFlag.ZBuffer, False)
Dim camera As CameraSceneNode = smgr.AddCameraSceneNode(smgr.RootSceneNode)
camera.Position = New Vector3D(0, 0, 0)
camera.Rotation = New Vector3D(0, 0, 0)
While device.Run
device.VideoDriver.BeginScene(True, False, New Color(0, 0, 0, 0))
device.SceneManager.DrawAll()
device.GUIEnvironment.DrawAll()
device.VideoDriver.EndScene()
Threading.Thread.Sleep(50)
End While
End Sub
End Module