method Win32Window::setVisible

What it says on the tin: a place to discuss proposed new features.
Post Reply
cf
Gnoblar
Posts: 6
Joined: Wed Apr 30, 2008 3:17 pm

method Win32Window::setVisible

Post by cf »

Hi,

I would propose to add an implementation of RenderWindow::setVisible(bool) to Win32Window:

void Win32Window::setVisible(bool visible)
{
ShowWindow(getWindowHandle(), (visible ? SW_SHOW : SW_HIDE));
}

I added that function to RenderSystem_GL in order to write a windows MDI
application. I need to keep an auto-created RenderWindow around for sharing GL state between contexts on different windows.

Thanks,
cf
User avatar
mehdix
Halfling
Posts: 78
Joined: Fri Jun 22, 2007 3:59 pm

Post by mehdix »

And this is the linux version:

Code: Select all

Display *glxDisplay = 0;
Window glxWid;
renderWindow->getCustomAttribute("DISPLAY", &glxDisplay);
renderWindow->getCustomAttribute("WINDOW", &glxWid);

if (glxDisplay)
{
   if (show)
      XMapWindow(glxDisplay, glxWid);
   else
      XUnmapWindow(glxDisplay, glxWid);
}
Just wondering why trivial functions like setVisible() and setActive() are empty?
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 67
Contact:

Post by sinbad »

Generally for external window control we tend to recommend creating your own windows and using externalWindowHandle / parentWindowHandle.

Please submit as a patch if you'd like it included, things get easily buried here in the forum.
Post Reply