Hello all,
We all know that CEGUI uses System::renderGUI() for rendering all of created windows.
Here I've created a root window and three frame window(win1, win2, win3), then I want to control the window render order by program. For example, sometime I want to render win2 first, then render win1, at the end render win3, in another time, I want to render win3 first then render win2, at the end render win3.
Is there any method to set the render sequence and implement this request by program ?
I use CEGUI 0.7.5.
Much appreciation for any help.
SHEN Hui.
[SOLVED]How to render windows in a specified order
Moderators: CEGUI MVP, CEGUI Team
[SOLVED]How to render windows in a specified order
Last edited by shenhui on Fri Feb 25, 2011 03:08, edited 1 time in total.
Re: How to render windows in a specified order
Look into Window::setZOrderingEnabled, moveToFront, moveToBack, moveInFront and moveBehind
PS: Please don't post multiple times, it will just make us angry
PS: Please don't post multiple times, it will just make us angry
Re: How to render windows in a specified order
Thanks for your reply, maybe I do not express clearly. What I want to do is to draw each window independently, and do not use renderGUI() function, then I can draw some other texture in the correct graphics layer, such as web browser texture.
Sorry for the inconvenience.
SHEN Hui.
Sorry for the inconvenience.
SHEN Hui.
Re: [SOLVED]How to render windows in a specified order
I just find the solution on this forum to solve this problem, the solution is firstly bind the texture on a static image control, then you may rearrange the display sequences of all the windows as you wish:
Steps:
------------------------------------------------------------------------------------------------------------------------------------------
/*1. create a static image control */
winMgr.createWindow(SKIN "/StaticImage", "ImageTexture") ;
/*2. create a CEGUI texture based on existing render system texture(m_pTexture), for example m_pTexture may be LPDIRECT3DTEXTURE8 or LPDIRECT3DTEXTURE9 */
CEGUI::Texture* pCEGUITexture = &m_pD3DRender->createTexture(m_pTexture) ;
/*3. create a new image set and bind it on the CEGUI texture */
CEGUI::Imageset* pCEGUIImageset= &ImagesetManager::getSingleton().create("ImagesetName", *pCEGUITexture) ;
/*4. define a image based on new created image set */
pCEGUIImageset->defineImage("ImageName", CEGUI::Point(0.0f, 0.0f), CEGUI::Size(512, 512), CEGUI::Point(0.0f, 0.0f)) ;
/*5. set window property to bind texture on window */
winMgr.getWindow("ImageTexture")->setProperty("Image", "set:ImagesetName image:ImageName") ;
-----------------------------------------------------------------------------------------------------------------------------------------
Thanks for tedlin01 and his(her) thread(viewtopic.php?f=10&t=5315&p=25420&hilit=image+texture#p25420).
SHEN Hui.
Steps:
------------------------------------------------------------------------------------------------------------------------------------------
/*1. create a static image control */
winMgr.createWindow(SKIN "/StaticImage", "ImageTexture") ;
/*2. create a CEGUI texture based on existing render system texture(m_pTexture), for example m_pTexture may be LPDIRECT3DTEXTURE8 or LPDIRECT3DTEXTURE9 */
CEGUI::Texture* pCEGUITexture = &m_pD3DRender->createTexture(m_pTexture) ;
/*3. create a new image set and bind it on the CEGUI texture */
CEGUI::Imageset* pCEGUIImageset= &ImagesetManager::getSingleton().create("ImagesetName", *pCEGUITexture) ;
/*4. define a image based on new created image set */
pCEGUIImageset->defineImage("ImageName", CEGUI::Point(0.0f, 0.0f), CEGUI::Size(512, 512), CEGUI::Point(0.0f, 0.0f)) ;
/*5. set window property to bind texture on window */
winMgr.getWindow("ImageTexture")->setProperty("Image", "set:ImagesetName image:ImageName") ;
-----------------------------------------------------------------------------------------------------------------------------------------
Thanks for tedlin01 and his(her) thread(viewtopic.php?f=10&t=5315&p=25420&hilit=image+texture#p25420).
SHEN Hui.
Who is online
Users browsing this forum: No registered users and 5 guests