Debug errors for Renderer Start event handler

OK so I have such code in a Scroll based project.

orxBOOL ScrollGUICEGUI::OnRender ()
{
DrawGrid ();
CEGUI::System::getSingleton().renderGUI();
return false;
}

Which to my understanding is a proper way to do the rendering by myself in this case via the CEGUI library. It returns false which Scroll returns as orxSTATUS_FAILURE to the renderer. Which in turn will not try to perform its own rendering. Right?

Now with this code using svn orx debug build on Linux I get such error every frame:
[2012-07-27 09:51:58] [RENDER] [orxRender.c:orxRender_RenderViewport():1532] [orxOBJECT 0x9e2d218 / ScrollGUI -> orxBITMAP 0x9a42038] couldn't be rendered.

I think I traced this to orx/code/plugins/Renderer/Home/orxRenderer.c
There in RenderObject function around line 898 we have the code that sends the orxRENDER_EVENT_OBJECT_START event
/* Sends start event */
if(orxEvent_Send(&stEvent) != orxSTATUS_FAILURE)

However what it is missing to my mind is an "else" clause that will set properly the return value like this
/* Updates result */
eResult = orxSTATUS_SUCCESS;

As bypasing the renderer step by handling orxRENDER_EVENT_OBJECT_START event is supposed to be supported by the engine it should treat such behaviour as correct one.

What do you think?

Cheers,
Graag

Comments

  • edited July 2012
    Yep, noticed the same thing last week and it was just a stray error message not taking into account user-aborted rendering.

    I thought I fixed it a few days ago though, which version are you using?
  • edited July 2012
    Well I did "svn up" before posting. Currently I'm at revision 2992.

    Cheers,
    Graag
  • edited July 2012
    Ok, I'll check that tonight then, I could have sworn I had fixed it. Time to get more sleep. :)
  • edited July 2012
    Mmh, I can't reproduce it here, are you sure you don't have a version mismatch with the version of orx you're using with scroll and the current svn HEAD?

    If I take a look at the current orx in the svn, line 1532 of orxRender.c I have a comment (no code), and the orxEvent_Send() you noticed has this else condition:
          else
          {
            /* Updates result, aborted by user request */
            eResult = orxSTATUS_SUCCESS;
          }
    

    Which is actually the change I made 5 days ago (rev. 2988).

    Or am I missing something?
  • edited July 2012
    My bad. Sorry to waste your time.

    Seems that my build after "svn up" did not update the renderer plugin as it should. As I cannot reproduce the problem with HEAD anymore.

    The missing else block is around line 1013. That's the part of code that's called when following condition is not satisfied:
    /* 2D? */
    if(orxStructure_TestFlags(pstGraphic, orxGRAPHIC_KU32_FLAG_2D))

    So when I added the missing block there and recompiled the problem disappeared, hence I was sure I found a bug ;-)

    Cheers,
    Graag
  • edited July 2012
    No worries, I'd rather there's no bug to fix than a very insidious one to find! ;)
Sign In or Register to comment.