Closed nazgee closed 11 years ago
This is just a prof of concept (works fine): SHA1: d1c25deaaa6717d1ae0f36adcc3c5660f9d952b5
As I said before- I will prepare a fix in GLState if you don't mind... I'm just not sure how scissor rect should be stored. I am not convinced about pulling in new ScissorData class for this purpose
Looks good. I'd like to pipe it through the GLState
so it's just like pushing and popping the GL matrices (as opposed to the static Stack
).
LOL... I was trying to forge using github API... let me clean this mess (or I'll give up and file a pull request)
If you want regular Stack
Looks good will merge asap after a closer look tonight.
TIA
turned out to be not that good as it looked on the first sight?
:-1: Still not good, but you probably already know it. It correctly restores clipping, so it is better, but it also should take a union of previous clip settings...
:+1: if you need it squashed into single commit, instead of these two, let me know.
initial conrtibution: f878887c42adcb55157e41a61922e0969ff9a591 addition of union: 73276bd8818e15d14f29980d689d511ec97bee85
This is how embedding ClipEntities is working in "real life": http://www.youtube.com/watch?v=TVry3gB-Eqo It just works :-)
There is a problem when ClipEntities are being nested- it is caused by not restoring glScissor rect properly (test bit is restored, scissor rect is not).
It can be solved by:
I have this stack currently sitting static in my ClipEntity just to prove that it works, but I'm guessing that it should be kept in GLState like this:
If there is something you're willing to pull- let me know. If that's something you want to fix on your own- please do :)