First, here's the code in my CGEGraphics class (it handles Irrlicht):
Code: Select all
#Region "Namespace/Class Imports"
Imports Irrlicht
Imports Irrlicht.Video
Imports Irrlicht.Core
Imports Irrlicht.Scene
#End Region
Public Class CGEGraphics
#Region "Variable Definitions"
Dim device As IrrlichtDevice
#End Region
#Region "Properties"
Public WriteOnly Property WindowText()
Set(ByVal value)
device.WindowCaption = value
End Set
End Property
#End Region
Public Sub New()
Dim device As New IrrlichtDevice(Irrlicht.Video.DriverType.OPENGL)
End Sub
Public Sub StartRender()
While device.Run() = True
If device.WindowActive Then
device.VideoDriver.BeginScene(True, True, New Color(0, 100, 100, 100))
device.SceneManager.DrawAll()
End If
End While
End Sub
End Class
Next, I made a little demo project to test everything. Here is the code for it:
Code: Select all
Imports CerberusEngine
Imports System.Threading
Module Module1
Dim graphics As CGEGraphics
Dim rndrThread As Thread
Sub Main()
graphics = New CGEGraphics
rndrThread = New Thread(AddressOf graphics.StartRender)
End Sub
End Module
What did I do wrong? (Also, if anyone is interested in this, you can contact me on yahoo or msn (nicknames in my profile). As you can see, I'm going to need some help)
Thanks!