GUI Text - CDXUTTextHelper

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • GUI Text - CDXUTTextHelper

      So this has bugged me for awhile, and so I finally got around to looking to into it. But basically, at least on my computer, the CDXUTTextHelper GUI in the HumanView always renders behind everything. And you can only see it when you used the free roaming camera to look at a spot where nothing is in front of it. As seen below.

      Basically to fix this, I moved the ordering of when the Text is rendered to after everything else, but before the console.

      Source Code

      1. void HumanView::VOnRender(double fTime, float fElapsedTime )
      2. {
      3. m_currTick = timeGetTime();
      4. if (m_currTick == m_lastDraw)
      5. return;
      6. // It is time to draw ?
      7. if( m_runFullSpeed || ( (m_currTick - m_lastDraw) > SCREEN_REFRESH_RATE) )
      8. {
      9. if (g_pApp->m_Renderer->VPreRender())
      10. {
      11. m_ScreenElements.sort(SortBy_SharedPtr_Content<IScreenElement>());
      12. for(ScreenElementList::iterator i=m_ScreenElements.begin(); i!=m_ScreenElements.end(); ++i)
      13. {
      14. if ( (*i)->VIsVisible() )
      15. {
      16. (*i)->VOnRender(fTime, fElapsedTime);
      17. }
      18. }
      19. VRenderText();
      20. // Let the console render.
      21. m_Console.Render();
      22. // record the last successful paint
      23. m_lastDraw = m_currTick;
      24. }
      25. g_pApp->m_Renderer->VPostRender();
      26. }
      27. }
      Display All
      Files
    • Nice catch, I've verified the sorting issue and checked in your fix to google code. :)

      -Rez