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?
Occlusion queries, clears and color mask
Re: Occlusion queries, clears and color mask
Ping hybrid/nadro.
Re: Occlusion queries, clears and color mask
BTW, the irr interface should use the original MaterialType, otherwise something using geometry/vertex shaders can have wrong results.
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: Occlusion queries, clears and color mask
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.
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.