The latest version of the patch is available on the OGRE bug tracker
It corrects the alf-tab crash
Hi !

I am modifying the D3D9 rendersystem to support multihead
It is not very easy because all the windows must be created before creating the d3d device so I had to add a method in the abstract Ogre::RenderSystem and in Ogre::Root to create all the windows and render windows at the same time :
Code: Select all
RenderWindowList D3D9RenderSystem::createMultiheadRenderWindows(WindowParameterList &windowParams)
{
[...]
RenderWindowList win;
mActiveD3DDriver->setMultihead(true);
win.push_back(new D3D9RenderWindow(mhInstance, mActiveD3DDriver, false));
NameValuePairList newMiscParams;
if(windowParams[0].miscParams == NULL)
{
windowParams[0].miscParams = &newMiscParams;
}
(*windowParams[0].miscParams)["noD3DRessources"] = "true";
win[0]->create( windowParams[0].name, windowParams[0].width,
windowParams[0].height, true,
windowParams[0].miscParams);
mPrimaryWindow = (D3D9RenderWindow *)win[0];
for( int i = 1; i < adapterCount; ++i)
{
win.push_back(new D3D9RenderWindow(mhInstance, mActiveD3DDriver, true));
NameValuePairList newMiscParams2;
if(windowParams[i].miscParams == NULL)
{
windowParams[i].miscParams = &newMiscParams2;
}
(*windowParams[i].miscParams)["noD3DRessources"] = "true";
(*windowParams[i].miscParams)["parentWindowHandle"] =
StringConverter::toString(reinterpret_cast<int>(static_cast<D3D9RenderWindow*>(win[0])->getWindowHandle()));
(*windowParams[i].miscParams)["head"] = StringConverter::toString(i);
win[i]->create( windowParams[i].name, windowParams[i].width,
windowParams[i].height, true,
windowParams[i].miscParams);
mSecondaryWindows.push_back(static_cast<D3D9RenderWindow *>(win[i]));
static_cast<D3D9RenderWindow*>(win[i])->buildPresentParameters();
}
for( int i = 0; i < adapterCount; ++i)
{
static_cast<D3D9RenderWindow*>(win[i])->createD3DResources();
attachRenderTarget( *win[i] );
}
[...]
return win;
}
the function returns a list of renderwindow, one per head
but the problem is that only one fullscreen window is refreshed because only one has the focus.
how can I force the other windows to be refreshed ?
change
Code: Select all
if( itarg->second->isActive() && itarg->second->isAutoUpdated())
or change WindowEventUtilities::_WndProc ?
I tried to comment the code associated with the WM_ACTIVATE message but it is dirty and the second screen flickers :/
do you have any solution ?
i can post a patch of my other changes. if it can help to add an official multihead support to ogre...