I initially thought it was ImGui, and spent a while debugging it, but it seems to be sourced from Ogre as when I changed the viewports background colour, it isn't taking effect.
A picture is worth a thousand words:
This 'ghosting' remains until I open an empty menubar item (screenshot in top left shows the remnants of a non-empty menubar item), drag the window so it breaches the viewport edge, or collapse the window so it becomes a simple bar, at which point the entire viewport looks completely normal. The Ogre head always displays without issues.
I've tried various tweaks to the viewport, render system and lighting, and checked a whole bunch of examples, but can't see what I'm doing wrong (if anything!). Compacted, relevant code below.
Code: Select all
bool OgreImGui::frameRenderingQueued(const Ogre::FrameEvent& evt)
{
// ... imgui code ...
}
bool OgreApplication::Init()
{
render_system = new D3D9RenderSystem(GetModuleHandle(NULL));
root->setRenderSystem(render_system);
// ... set config options, get width/height etc ...
render_window = root->initialise(true, "OgreRenderWindow");
render_window->setVisible(true);
render_window->setActive(true);
render_window->resize(w, h);
scene_mgr = root->createSceneManager(Ogre::ST_GENERIC, "MainScene");
scene_mgr->setAmbientLight(ColourValue(0.5f, 0.5f, 0.5f));
camera = scene_mgr->createCamera("MainCamera");
camera->setPosition(250, 5, 250);
camera->lookAt(0, 5, 0);
viewport = render_window->addViewport(camera);
const Real aspect_ratio = Real(viewport->getActualWidth()) / Real(viewport->getActualHeight());
camera->setAspectRatio(aspect_ratio);
camera->setAutoAspectRatio(true);
viewport->setAutoUpdated(true); // no difference
viewport->setBackgroundColour(ColourValue(1.0f, 1.0f, 0.8f));
viewport->setClearEveryFrame(true); // no difference
// ... create lights ...
// ... load resources ...
// ... create OgreImGui, add listener ...
}
Thanks in advance