Hello,
Here's my problem: I've an Irrlicht DLL that is implemented into a delphi application, but instead of being launched as a new window I'd like that the dll is launched into the delphi's window and not as a new process.
I already succeed to melt the screen between them but I still have a window into a window.
So I thought, what if I ask createDevice to draw directly into my delphi's window ?
I tried to find the createDevice's declaration, without any success...
Any kind of idea ?
Billy
P.S: I apologize for my poor english.
[Solved] Modify createDevice() source code
-
- Posts: 26
- Joined: Fri Jun 19, 2015 6:51 am
[Solved] Modify createDevice() source code
Last edited by BillyCallahan on Fri Jun 19, 2015 2:18 pm, edited 1 time in total.
Re: Modify createDevice() source code
I don't know the Delphi wrapper, but Irrlicht has usually createDeviceEx. That can take a window-handle for an existing Window. Example 14.Win32Window shows how to use that.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
-
- Posts: 26
- Joined: Fri Jun 19, 2015 6:51 am
Re: Modify createDevice() source code
Oh thanks man, this helped me a lot
I'm now stuck here:
When the dll executes it, the dll crashes and I get an error from Delphi (comes from Irrlicht.dll) : "Floating point division by zero".
Here's my Irrlicht code:
Any idea ?
I'm now stuck here:
Code: Select all
smgr->drawAll();
Here's my Irrlicht code:
Code: Select all
int main(HWND delphiHwnd){
.
.
.
irr::SIrrlichtCreationParameters param;
param.WindowId = reinterpret_cast<void*>(delphiHwnd);
param.DriverMultithreaded = driverType;
param.WindowSize = core::dimension2d<u32>(640, 400);
param.Bits = 16;
param.Fullscreen = false;
IrrlichtDevice *device =
createDeviceEx(param);
-
- Posts: 26
- Joined: Fri Jun 19, 2015 6:51 am
Re: Modify createDevice() source code
Oops, got my answer: I put param.DriverMultiThreaded...
Well
Well