I am starting off with the GUI and I have hit a bit of a problem trying to get it displaying.
I have a 3D Head Mounted Device that I am working on which uses sequential frames to display an image. So it draws one image for the left eye and then for the right eye on each loop. The problem I have is that when I display the right eye there is no GUI shown.
I have tried to over write the GUI to draw when I need it to but that has caused it to not draw any GUI onto the screen at all.
Enough talk here is some code:
Log File:
Code: Select all
********************************************************************************
15/12/2010 21:06:31 (Std) * -------- START OF ESSENTIAL SECTION TO BE POSTED ON THE FORUM -------- *
15/12/2010 21:06:31 (Std) ********************************************************************************
15/12/2010 21:06:31 (Std) ---- Version 0.7.5 (Build: Dec 8 2010 Debug Microsoft Windows MSVC++ 9.0 32 bit) ----
15/12/2010 21:06:31 (Std) ---- Renderer module is: CEGUI::OgreRenderer - Official OGRE based 2nd generation renderer module. ----
15/12/2010 21:06:31 (Std) ---- XML Parser module is: CEGUI::ExpatParser - Official expat based parser module for CEGUI ----
15/12/2010 21:06:31 (Std) ---- Image Codec module is: OgreImageCodec - Integrated ImageCodec using the Ogre engine. ----
15/12/2010 21:06:31 (Std) ---- Scripting module is: None ----
15/12/2010 21:06:31 (Std) ********************************************************************************
15/12/2010 21:06:31 (Std) * -------- END OF ESSENTIAL SECTION TO BE POSTED ON THE FORUM -------- *
Here is where my left and right images are displayed. The same viewport is used so I think this is where my problem may arise.
I think that it might be in the swap buffers because the GUI wouldn't know about the other buffer.
Code: Select all
// Update left eye first.
d_pLeftEyeQuery->Issue(D3DISSUE_BEGIN);
Camera * tempCam = d_pCameraSystem->GetCamera(LEFT_EYE);
Viewport * vp = mWindow->getViewport(0);
vp->setCamera(tempCam);
vp->update();
d_pCameraSystem->Update(evt, LEFT_EYE);
mWindow->update();
// Then right eye
d_pRightEyeQuery->Issue(D3DISSUE_BEGIN);
tempCam = d_pCameraSystem->GetCamera(RIGHT_EYE);
vp->setCamera(tempCam);
vp->update();
d_pCameraSystem->Update(evt, RIGHT_EYE);
mWindow->update(false);
Thanks in advance.
If I am helped then I will post like mad whenever this problem arises for anyone else.