About Store Forum Documentation Contact



Post Reply 
Embedding an Esenthel render window into large industrial application
Author Message
rndbit Offline
Member

Post: #31
RE: Embedding an Esenthel render window into large industrial application
(05-13-2011 05:24 PM)Dynad Wrote:  Whats the point of running 2 instances of EE? That won't make a very good tool if u ask me... And adding viewports in EE isnt what im looking for... why should i going for this way if you use the gui layout of EE...

well point would be having two separate viewports rendered on separate gui parts, but yep, its very impractical. i had an idea tho. you can make separate viewports to textures, then rgba buffer of texture could be drawn on to gui. what would be left is correctly forwarding mouse/keyboard input to renderer.
05-14-2011 09:26 AM
Find all posts by this user Quote this message in a reply
zzz9 Offline
Member

Post: #32
RE: Embedding an Esenthel render window into large industrial application
Can someone help me? I want to embed Esenthel into Qt. I've found an example that loads Esenthel app from DLL. It is very usefull. But I really can't figure out when I have to get Esenthel app hwnd, setparent and call StartEEManually.

At this moment I have the following code in the program:
Qt:
void Map3DThread :: run ()
{
if(DLLModule = LoadLibrary(L"Game DLL.dll"))
{
if(StartFunc = (void*(__cdecl*)(void*))GetProcAddress(DLLModule, "StartEsenthelEngineFromDLL"))
{
Handle = (HWND)StartFunc(DLLModule);
SetWindowLong(Handle, GWL_EXSTYLE,WS_EX_LEFT);
SetWindowLong(Handle, GWL_STYLE,WS_CHILD|WS_VISIBLE);

SetParent(Handle, ParentWnd->winId());
SetWindowPos(Handle, HWND_TOP, 0, 0, 320, 240, SWP_SHOWWINDOW);
}
else
{

}
FreeLibrary(DLLModule);
}
else
{

}


}

DLL:
extern "C" __declspec(dllexport) void* __cdecl StartEsenthelEngineFromDLL(Ptr dll_module_instance)
{
//App.flag = APP_RESIZABLE;
App.flag = APP_NO_TITLE_BAR | APP_NO_CLOSE | APP_MINIMIZABLE | APP_RESIZABLE | (1 << 6);
StartEEManually(dll_module_instance);
return App.hwnd();
}
10-18-2011 11:34 AM
Find all posts by this user Quote this message in a reply
zzz9 Offline
Member

Post: #33
RE: Embedding an Esenthel render window into large industrial application
Done. I have written the code that sets window flags in Init in DLL.
10-18-2011 07:01 PM
Find all posts by this user Quote this message in a reply
Post Reply