Im trying to Irrlicht from within Delphi 2005, so im trying to use the .net version and tbh im utterly insure how to include Irrlicht with Delphi.
I know i've probably missed something stupid on my part
Code: Select all
Imports Irrlicht
Imports Irrlicht.Core
Imports Irrlicht.Video
Imports Irrlicht.Scene
Code: Select all
Dim Engine As New Irrlicht.IrrlichtDevice(DriverType.OPENGL)
Code: Select all
// Start the engine and let the poop hit the fan!
Engine.Run()
'3D-Loop this draws all frames one at a time....
While Engine.Run = True
'Scene has to be drawn, we'll do that here in the loop
Engine.VideoDriver.BeginScene(True, True, New Color(0, 0, 0, 0))
Engine.SceneManager.DrawAll()
'Wanna draw a 2D Image? Well that has got to be done here:
'--- Gun Image
Dim hudGun As ITexture = Engine.VideoDriver.GetTexture(Application.StartupPath & "\data\hud\wpn_rifle.bmp")
Engine.VideoDriver.MakeColorKeyTexture(hudGun, New Position2D(1, 1))
Engine.VideoDriver.Draw2DImage(hudGun, New Position2D(Engine.VideoDriver.ScreenSize.Width - 99, Engine.VideoDriver.ScreenSize.Height - 57), New Rect(0, 0, 89, 47), New Color(255, 255, 255, 255), True)
'Scene has been drawn and we can end it for this frame
Engine.VideoDriver.EndScene()
'Wanna have a Realtime FPS as a caption? Try this:
Engine.WindowCaption = "My Project - FPS: " & engine.VideoDriver.FPS
End While
'When we end up here it means that the engine has been stopped
'So we can clean up the mess and show or main form again
frmMain.Show()