i'm working on a program that has to be able to render from three cameras into three different widgets (I'm using Qt, but I guess this is a general question).
This is how I did it so far:
First, I create an Irrlicht device and I set the window handle of the first widget to render in as the WindowId-property of the creation parameters.
Then, whenever there needs to be a render in a certain widget, I do this:
Code: Select all
Driver->OnResize(widgetSize); // widgetSize_id = size of the current widget to render into
Driver->beginScene(true, true, backgroundcolor, irr::video::SExposedVideoData(window_id)); // window_id = handle of the current widget to render into
SceneManager->setActiveCamera(cam);
SceneManager->drawAll();
Driver->endScene()
On the other hand, when I don't call OnResize, the driver uses the same resolution for all rendering widgets, but actually they have different sizes.
What do I have to do to make this work?
Thanks a lot,
D.