Invisible window creation

What it says on the tin: a place to discuss proposed new features.
Post Reply
REiNDEeR
Greenskin
Posts: 149
Joined: Sat Apr 14, 2007 1:27 pm

Invisible window creation

Post by REiNDEeR »

Would it be possible to implement somekind of feature to create an invisible window?

I've implemented it for OpenGL but I dont know much about linux so thats why I didnt make a patch.

This is how I implemented it:

Code: Select all

//usage
Ogre::NameValuePairList params; 
params["visible"] = Ogre::StringConverter::toString(false); 
root->createRenderWindow("MyWindow", 0, 0, false, &params); 

Code: Select all

//impl
bool visible = true;

//.............

if ((opt = miscParams->find("visible")) != end)
			{
				visible = StringConverter::parseBool(opt->second);
			}

//.............

if (!mIsExternal)
		{
			DWORD dwStyle = WS_CLIPCHILDREN | WS_CLIPSIBLINGS;

			if (visible) 
				dwStyle |= WS_VISIBLE;
//...........
I'm sure you guys can do it alot better :)
User avatar
Wolfmanfx
OGRE Team Member
OGRE Team Member
Posts: 1525
Joined: Fri Feb 03, 2006 10:37 pm
Location: Austria - Leoben
x 100
Contact:

Post by Wolfmanfx »

Dont know if this possible under linux cause gtk+ gives you no window if ur Window is not visible u only get one if ur window gets realized so i dont think its really possible under linux but maybe things handeld other with GLX.
REiNDEeR
Greenskin
Posts: 149
Joined: Sat Apr 14, 2007 1:27 pm

Post by REiNDEeR »

Well its basicly the same as calling setVisible(false). The only difference is that in this case the window is created invisible, so if youd call setVisible(true) it would show up.
Post Reply