I'm doing a game engine in Win32 API C++ that implements Irrlicht as the graphic engine.
The problem as is showed in the posted picture is that as it has a somewhat GameStudio or 3D studio like GUI, I want to work with different views of the same thing simultaneously (Top view, front, perspective, etc). Unfortunately I just can make it show up in only one of the four views.
I first tested the lower right child window of the MDI and everything went just right, then I implemented the same thing in the remaining windows, but Irrlicht only shows up in the latest loaded window.
In the picture I'm testing it with 3 windows and only the 3rd (lower left) in purple world background, shows up while the 1st and 2nd windows show in deep black with no device loaded on them. The same happens if I use just one device for all the windows
Then I tried with different devices for each of the three windows and the same happens.
Here are the image of the situation and the important part of the code:

Note: The I left the fourth window (upper left) empty with nothing on it for the moment as I'm trying to solve it in just three windows before continuing.bool CDeviceDriver::bGREBasics(HWND hChildMDI)
{
param.WindowId = (s32)hChildMDI;
param.DriverType = EDT_OPENGL;
device = createDeviceEx(param);
driver = device->getVideoDriver();
smgr = device->getSceneManager();
smgr->addCameraSceneNode(0, vector3df(0,30,-40), vector3df(0,5,0));
return 0;
}
bool CDeviceDriver::bGREBasics1(HWND hChildMDI1)
{
param1.WindowId = (s32)hChildMDI1;
param1.DriverType = EDT_OPENGL;
device1 = createDeviceEx(param1);
driver1 = device1->getVideoDriver();
smgr1 = device1->getSceneManager();
smgr1->addCameraSceneNode(0, vector3df(0,30,-40), vector3df(0,5,0));
return 0;
}
bool CDeviceDriver::bGREBasics2(HWND hChildMDI2)
{
param2.WindowId = (s32)hChildMDI2;
param2.DriverType = EDT_OPENGL;
device2 = createDeviceEx(param2);
driver2 = device2->getVideoDriver();
smgr2 = device2->getSceneManager();
smgr2->addCameraSceneNode(0, vector3df(0,30,-40), vector3df(0,5,0));
return 0;
}
bool CDeviceDriver::bRunGRE()
{
device->getTimer()->tick();
driver->beginScene(true, true, SColor(255,255,101,140));
smgr->drawAll();
device1->getTimer()->tick();
driver1->beginScene(true, true, SColor(255,215,101,140));
smgr1->drawAll();
device2->getTimer()->tick();
driver2->beginScene(true, true, SColor(255,125,101,140));
smgr2->drawAll();
driver2->endScene();
driver1->endScene();
driver->endScene();
return 0;
}
Any help appreciated.
