About Store Forum Documentation Contact



Post Reply 
Integrating Esenthel with CEGUI
Author Message
Ivian Offline
Member

Post: #1
Integrating Esenthel with CEGUI
Hi. Is there anyone, who have used CEGUI with Esenthel?

How can I get acces to the D3D device which is required with CEGUI in Esenthel?
06-25-2011 05:27 PM
Find all posts by this user Quote this message in a reply
rndbit Offline
Member

Post: #2
RE: Integrating Esenthel with CEGUI
well man, i understand why you want alternative GUI library. truth to be told - d3d device is not exposed in any way to us, so we need to hack the engine and get it ourselves. fortunately it is very easy. You just need to compile your game and open it in your favorite disassembler like IDA. You need to find API call to function that creates D3D device, like:
Code:
.text:008892F3                 call    j__Direct3DCreate9@4 ; Direct3DCreate9(x)
.text:008892F8                 mov     dword_E06FD0, eax
Last line shows you where d3d device is stored. Then you just need to do something like this:
Code:
IDirect3D9* d3dDevice = *(IDirect3D9**)0xE06FD0;
And there you have it. Note that offset may be different in newer SDK versions so you should find one yourself as i used lib that is some months old. Good luck with integrating CEGUI, and please let me know of your progress as i would probably like to use it too if you succeed.
07-26-2011 11:40 AM
Find all posts by this user Quote this message in a reply
Post Reply