Hello. I'm new to this forum and I'm a newbie in CEGUI. I know that this post is quite long, but I was trying to make it as clear as possible. Hope that you guys can read it.
Recently I have successfully integrated CEGUI with Truevision3D(a DirectX 8 3D Game Engine). The way I do it (conceptually) is as follows :-
1) Get the Direct3D device used by Truevision3D (the function is provided in the game engine).
2) Use the Direct3D device to create a DirectX 8.1 renderer for CEGUI. I also create a CEGUI System object using the renderer created previously.
3) initialize the content of my GUI interface using CEGUI
4) render the interface using CEGUI System's renderGUI() before the buffer being swapped.
Everything runs fine (my CEGUI interface run on top of Truevision3D), BUT the order of rendering for Truevision3D mess up. The meshes that should be at the back was rendered in front of the meshes that are closer to the camera. When I comment the renderGUI() code and run it, the rendering order for Truevision3D is working correctly again. I have looked at the CEGUI logfile but I found no errors.
So in the end I examine my codes and experiment things here and there. I found that when I used renderGUI(), it changes the Truevision3D rendering order in such a way that the first 3D object created will be rendered first without considering the Z value.
Although I do not know whether it will work or not, but the only solution in my mind is to create a new Direct3D device for CEGUI, but let the newly created Direct3D device to draw on the back buffer of Truevision3D. Truevision3D do provide a function for me to get the back buffer surface of Truevision3D, but with my limited knowledge in DirectX, I do not know how to assigned the back buffer to the newly created Direct3D device.
I hope that you great people out there can help me out with this. Thanks in advance.
HELP! Rendering Problem when integrating CEGUI with TV3D
Moderators: CEGUI MVP, CEGUI Team
HELP! Rendering Problem when integrating CEGUI with TV3D
Life is like sine wave where it has many ups and downs.
Yeah!!!
Thank you for your help. It really worth a MILLION !!!!
What I did was I re-enabled the z-buffering after the renderGUI() call....
....and after that everything works fine....
Thanks again, lindquist !!!!
Thank you for your help. It really worth a MILLION !!!!
What I did was I re-enabled the z-buffering after the renderGUI() call....
Code: Select all
System::getSingleton().renderGUI();
pD3Ddevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
....and after that everything works fine....
Thanks again, lindquist !!!!
Life is like sine wave where it has many ups and downs.
Who is online
Users browsing this forum: No registered users and 19 guests