Important warning for those using DirectX

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

VitaliBR
Not too shy to talk
Not too shy to talk
Posts: 25
Joined: Mon Oct 18, 2010 02:28

Important warning for those using DirectX

Postby VitaliBR » Thu Nov 11, 2010 04:30

After I gave head to break for a few hours, I managed to solve the problem he was having.
The CEGUI was altering the state of my device when I was calling the function to render:

Code: Select all

CEGUI::System::getSingleton().renderGUI();


I solved the problem by simply saving all current states and applying them again after render CEGUI :D
look this:

Code: Select all

   IDirect3DStateBlock9* pStateBlock = NULL;
   m_pDevice->CreateStateBlock(D3DSBT_ALL, &pStateBlock);
   pStateBlock->Capture();

   CEGUI::System::getSingleton().renderGUI();

   pStateBlock->Apply();
   pStateBlock->Release();


Thanks
I hope that this information is useful

Jamarr
CEGUI MVP
CEGUI MVP
Posts: 812
Joined: Tue Jun 03, 2008 23:59
Location: USA

Re: Important warning for those using DirectX

Postby Jamarr » Thu Nov 11, 2010 22:37

I am not sure what thread this post was in response to but if you search the forums for "DirectX" there are several threads that state you need to manage the DirectX state yourself, even for CEGUI. People would rather spend 2m asking a question and then wait days for the correct answer, rather than spending 10m searching for an answer that already exists. But thanks for pointing this out again :wink:
If somebody helps you by replying to your thread, upvote him/her as a thanks! Make sure to include your CEGUI.log and everything you tried when posting! And remember that we are not magicians!

VitaliBR
Not too shy to talk
Not too shy to talk
Posts: 25
Joined: Mon Oct 18, 2010 02:28

Re: Important warning for those using DirectX

Postby VitaliBR » Thu Nov 11, 2010 23:37

I agree with you, friend ;)

that I received some private messages asking about the state of DirectX, I'm posting here for all to see :D


Return to “Help”

Who is online

Users browsing this forum: Bing [Bot] and 2 guests