GregH
28-02-2006 10:05:39
Hi Folks,
Things are progressing well here...I've created a customised Config Dialogue (which still shows the unwanted DX7 - I'll get around to expelling that particular crash dummy one day).
My next area of focus is to get a mouse cursor on the screen, which leads me to CEGUI.
I understand that I have to instantiate CEGUI Renderer and CEGUI System objects...but I can't get past the CEGUI Renderer assignment (as I crash with the usual "Object reference not set..." error).
This is the scenario:
I've imported the necessary refs (I think)...
I've then gone on to create all of the necessary objects to successfully create an animated OGRE scene. No problemo. Ok..now I need to add the CEGUI stuff.
So since then, I've added two new objects in the General Declarations section of the module (I've used the formal Namespace syntax for clarity here):
NOTE: I'm not sure if I should be using OgreDotNet.Cegui or CeguiDotNet objects for the GUI stuff - please clarify ???
Then, during the initialisation process, and after I've created the render window and scenemanager (which has always resulted in perfect 3D rendering), I try to initialise the CEGUI Renderer and CEGUI System objects using either of the pairs of Private's above...
Now this I know:
>MyRenderWindow renders perfectly if I don't try to use CEGUI, so it has initialised OK.
>RenderQueueGroupID.RENDER_QUEUE_OVERLAY has a value of 100.
>False is for post_queue (whatever that means).
>MakeUInt32(3000) is a custom function that works elsewhere without problems.
>MySceneManager has already successfully loaded a Terrain.cfg by this stage, and would render the scene if it weren't for the CEGUI calls. I have seen sample C++ code that uses the scenetype enumerator instead of the actual scenemanager, but either way it breaks.
Despite all of this, MyGUIRenderer assignment fails with the ubiquitous "Object reference not set..."
I note that the OgreCEGUIRenderer constructor has 7 overloads...and if I only pass the RenderWindow parameter I can initialise the MyGUIRenderer object...but then the MyGUISystem fails straight afterward with the same "Object reference blah blah blah error".
Has anybody managed to get CEGUI working with VB.Net code...I'd really appreciate some guidance in this regard.
Cheers,
GregH.
Things are progressing well here...I've created a customised Config Dialogue (which still shows the unwanted DX7 - I'll get around to expelling that particular crash dummy one day).
My next area of focus is to get a mouse cursor on the screen, which leads me to CEGUI.
I understand that I have to instantiate CEGUI Renderer and CEGUI System objects...but I can't get past the CEGUI Renderer assignment (as I crash with the usual "Object reference not set..." error).
This is the scenario:
I've imported the necessary refs (I think)...
Imports CeguiDotNet
Imports OgreDotNet
Imports OgreDotNet.Cegui
Imports Math3D
I've then gone on to create all of the necessary objects to successfully create an animated OGRE scene. No problemo. Ok..now I need to add the CEGUI stuff.
So since then, I've added two new objects in the General Declarations section of the module (I've used the formal Namespace syntax for clarity here):
Private MyGUIRenderer As OgreDotNet.Cegui.OgreCEGUIRenderer
Private MyGUISystem As CeguiDotNet.GuiSystem
' ??? or is it ???
Private MyGUIRenderer As CeguiDotNet.Renderer
Private MyGUISystem As CeguiDotNet.GuiSystem
'??? or is it neither of these ???
NOTE: I'm not sure if I should be using OgreDotNet.Cegui or CeguiDotNet objects for the GUI stuff - please clarify ???
Then, during the initialisation process, and after I've created the render window and scenemanager (which has always resulted in perfect 3D rendering), I try to initialise the CEGUI Renderer and CEGUI System objects using either of the pairs of Private's above...
MyGUIRenderer = New OgreCEGUIRenderer(MyRenderWindow, RenderQueueGroupID.RENDER_QUEUE_OVERLAY, False, MakeUInt32(3000), MySceneManager)
MyGUISystem = New CeguiDotNet.GuiSystem(MyGUIRenderer)
Now this I know:
>MyRenderWindow renders perfectly if I don't try to use CEGUI, so it has initialised OK.
>RenderQueueGroupID.RENDER_QUEUE_OVERLAY has a value of 100.
>False is for post_queue (whatever that means).
>MakeUInt32(3000) is a custom function that works elsewhere without problems.
>MySceneManager has already successfully loaded a Terrain.cfg by this stage, and would render the scene if it weren't for the CEGUI calls. I have seen sample C++ code that uses the scenetype enumerator instead of the actual scenemanager, but either way it breaks.
Despite all of this, MyGUIRenderer assignment fails with the ubiquitous "Object reference not set..."
I note that the OgreCEGUIRenderer constructor has 7 overloads...and if I only pass the RenderWindow parameter I can initialise the MyGUIRenderer object...but then the MyGUISystem fails straight afterward with the same "Object reference blah blah blah error".
Has anybody managed to get CEGUI working with VB.Net code...I'd really appreciate some guidance in this regard.
Cheers,
GregH.