Occlusion queries, clears and color mask

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Occlusion queries, clears and color mask

Post by hendu »

I just spent a couple weeks tracking a bug, where in a specific case after an occlusion query, the app proceeded directly to try to clear a RTT.

Of course this failed, since all color masks were false.


Now, is this something I should have recognized in the app, and called glColorMask after occlusion queries to reset them to all true?
If this reset belongs to irr instead, where should it happen?

After each query would cause unnecessary changes. A check before each clear against ECP_NONE then?
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Occlusion queries, clears and color mask

Post by hendu »

Ping hybrid/nadro.
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Occlusion queries, clears and color mask

Post by hendu »

BTW, the irr interface should use the original MaterialType, otherwise something using geometry/vertex shaders can have wrong results.
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Occlusion queries, clears and color mask

Post by hendu »

Pong.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Re: Occlusion queries, clears and color mask

Post by hybrid »

IMHO the state should be reset immediately. Instead, we should improve the number of render objects in an occlusion query, such that it's possible to render large portions of the scene into an occlusion query.
On the other hand, if we check the render state in each place properly, we should be able to re-enable the color mask only when it is required. But that's a tedious task to find all the places where we should re-enable color mask. I think version one is better.
Post Reply