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

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
mongoose7
Posts: 1227
Joined: Wed Apr 06, 2011 12:13 pm

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

Post 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).
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

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

Post 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?
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

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

Post 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?
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

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

Post 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.
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

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

Post by 3DModelerMan »

Could one of the devs review this?
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

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

Post 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)
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

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

Post by 3DModelerMan »

Oh, I didn't know about that bit flag trick. I'll update the patch right now.
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

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

Post by 3DModelerMan »

The update is in the tracker. I tested everything again as well.
https://sourceforge.net/tracker/?func=d ... tid=540678
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

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

Post by hendu »

The help text is not clear on which way it is in the latest patch?
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

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

Post 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.
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

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

Post 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?
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

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

Post by 3DModelerMan »

Oh, the documentation. I can update that.
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

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

Post 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.
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

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

Post 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.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

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

Post 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.
Post Reply