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
I thought I fixed it a few days ago though, which version are you using?
Cheers,
Graag
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:
Which is actually the change I made 5 days ago (rev. 2988).
Or am I missing something?
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