Custom LogListener and ResourceListener

rosenkro

25-06-2006 18:25:19

Hi,

I need a little bit of help with OgreDotNet. Has anyone an little example how to implement a custom LogListener and/or ResourceListener in VB.NET or C#.NET? I've nothing found in the forum, except for C++. With C++ there's no problem for a custom LogListener and ResourceListeners for LoadingBar support. But I haven't found something for VB or C#.

I think I have to inherit a class from LogListener like this:


Public Class cLogListener
Inherits LogListener

Public Sub New(ByVal originalLogFilename As String, ByVal rendererConfigFilename As String, ByVal headerInfo() As String)
MyBase.New(cPtr, True)
End Sub

Public Overloads Sub write(ByVal mName As String, ByVal message As String, ByVal lml As LogMessageLevel, ByVal maskDebug As Boolean)
MessageBox.Show(message, mName)
End Sub
End Class


What do I need to pass to MyBase.New as cPtr and how do i call the addListener of the LogManager for calling my own LogListener?

Thanks in advance,

Roland