Page 3 of 5

Re: Request: manage which passes are drawn by smgr->drawall

Posted: Fri Jan 13, 2012 12:59 pm
by mongoose7
I think, if you just want to render one category, then specifying the category is easiest. But it may make it harder to allow a default of render all. Also, it may interfere with the current variable of currentRenderPass (I think).

Re: Request: manage which passes are drawn by smgr->drawall

Posted: Fri Jan 13, 2012 4:10 pm
by 3DModelerMan
What if we added a drawAllExclusive function for specifying which passes not to draw. And the behavior of drawAll would be to specify which passes should be drawn inclusively?

Re: Request: manage which passes are drawn by smgr->drawall

Posted: Fri Jan 13, 2012 8:37 pm
by 3DModelerMan
https://sourceforge.net/tracker/?func=d ... tid=540678
Passes are now inclusive, and I added a boolean to drawAll to provide support for exclusive passes as well. Any more suggestions for improvement?

Re: Request: manage which passes are drawn by smgr->drawall

Posted: Sat Jan 14, 2012 8:23 am
by hendu
Well, since you asked ;)

Mainly a style point, since the enum values are single bits, you wouldn't need to write == ENUM_XX, it's enough to test for zero or non-zero. But this is going far in the nitpicking, I'd like to see the current patch merged, let's wait for hybrid to do a review.

Re: Request: manage which passes are drawn by smgr->drawall

Posted: Sun Jan 15, 2012 2:12 pm
by 3DModelerMan
Could one of the devs review this?

Re: Request: manage which passes are drawn by smgr->drawall

Posted: Fri Jan 20, 2012 11:35 pm
by hybrid
I don't understand why the additional bool parameter is used. If you want to render everything except skybox, call drawAll(~ESNRP_SKYBOX)

Re: Request: manage which passes are drawn by smgr->drawall

Posted: Sat Jan 21, 2012 1:15 am
by 3DModelerMan
Oh, I didn't know about that bit flag trick. I'll update the patch right now.

Re: Request: manage which passes are drawn by smgr->drawall

Posted: Sat Jan 21, 2012 1:32 am
by 3DModelerMan
The update is in the tracker. I tested everything again as well.
https://sourceforge.net/tracker/?func=d ... tid=540678

Re: Request: manage which passes are drawn by smgr->drawall

Posted: Sat Jan 21, 2012 4:28 pm
by hendu
The help text is not clear on which way it is in the latest patch?

Re: Request: manage which passes are drawn by smgr->drawall

Posted: Sun Jan 22, 2012 1:11 am
by 3DModelerMan
What do you mean? It's the same as the last patch, except that the extra parameter was removed. You still specify which passes you WANT to draw not the ones you DON'T want to draw, just like in the second patch.

Re: Request: manage which passes are drawn by smgr->drawall

Posted: Sun Jan 22, 2012 8:33 am
by hendu
The help text says:
Allows you to disable/enable specific render passes by passing bitwise OR combinations of E_SCENE_NODE_RENDER_PASS values
Can you really say that only by reading that, you know which way it is?

Re: Request: manage which passes are drawn by smgr->drawall

Posted: Sun Jan 22, 2012 2:12 pm
by 3DModelerMan
Oh, the documentation. I can update that.

Re: Request: manage which passes are drawn by smgr->drawall

Posted: Tue Jan 24, 2012 7:58 am
by hybrid
Ok, I've reviewed the patch and its context. One thing that I saw is that the lightmanager will be called for each render pass, even though it's not chosen. Not sure if we should do something about this.

Re: Request: manage which passes are drawn by smgr->drawall

Posted: Tue Jan 24, 2012 10:37 am
by Mel
Maybe to pass to the lighting manager the current render pass so it may react accordingly? although this would break the current lighting manager's interface, or perhaps, adding a internal variable to the lighting manager interface so it can be checked at any moment which is the current render pass.

Re: Request: manage which passes are drawn by smgr->drawall

Posted: Tue Jan 24, 2012 11:49 am
by hybrid
Yeah, the thing is that this callback (the lightmanager) is called currently on every pass, even if no nodes exists. So at least for now the behavior after the patch would be just as before. Question is if it is really intended this way, or if we should improve this further. The light manager gets the render pass that it was called on. However, it does not know which or how many nodes for this pass exist. But I guess this boils down to a question regarding the light manager, and shouldn't be handled at the drawAll level.