New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extending Tundra mainwindow over multiple displays causes graphical glitches on d3d9. #545
Comments
Probably related to #457 |
Seems that this starts to happen when the window is resized to exceed the screen resolution of the original screen the window is/was located on. e.g. place window on a screen that has 1920px horizontal resolution, resize window so that it's partly on the other screen and it's width exceeds 1920px. Anything beyond 1920px is left unrendered or filled with graphical glitches. Part of Ogre log: |
Can build Tundra when ENABLE_DIRECTX is set to 0 in the root CMakeLists.txt and see what happens? |
ENABLE_DIRECTX basically controls if we do subrect blitting or full blitting of the UI. It might actually work better with 0 when you get full blitting. It's slower but the rect blitting might be causing the UI layer to dissapear, I dont know about the actual scene rendering glitches though, setting 0 should not affect it. |
Interestingly, I cannot find the "Renderer::Render: Dirty rect..." warning log print anywhere in Renderer::Render. |
This bug is due to Ogre's broken Direct3D9 multi-display support and device loss handling. Disabling creation of D3D devices per display should fix the problem, but it has to be checked if eg. CAVE continues to work properly. |
@Stinkfist0 https://github.com/realXtend/naali/blob/tundra2/src/Core/OgreRenderingModule/Renderer.cpp#L701 its in the blitting. I made that code at some point. It adjusts the rect if its bigger than the actual qt viewport, if i remember right it crashed Tundra occasionally if the rect was bigger when the blit went to DX functions. Cant remember exactly though why I made that code to be honest. Edit: Seems to have comment about it "// If graphics items are moved/animated outside the scene rect some dirty rect(s) can be outside the scene rect, check for it." and yeah animating widgets off screen crashed Tundra occasionally, this fixed it. |
@jonnenauha Ah, ok. I was looking the code in the LudoCraft/Tundra HEAD. |
It seems that the ogre renderwindow won't report sizes over the screen resolution of the original device (https://github.com/realXtend/naali/blob/tundra2/src/Core/OgreRenderingModule/Renderer.cpp#L497). The size of the renderwindow is in turn used to resize the dirty rect in here (https://github.com/realXtend/naali/blob/tundra2/src/Core/OgreRenderingModule/Renderer.cpp#L641). This might cause part of the window to incorrectly not be set as dirty? |
If this a bug within Ogre, as @cadaver mentioned, it might be hard to work around it in the Tundra code, but please give it a shot, if you have the time. |
I also encountered this -- luckily OpenGL indeed works well for this on Windows as well. Possibly the newer dx10 and dx11 renderers have fixed this too? |
See http://i.imgur.com/3kvDO.png for example (spanning becan from right to left).
This happens only when using D3D9.
The text was updated successfully, but these errors were encountered: