> thanks, I found this
> 
> https://github.com/v002/v002-Utilities
> 
> I guess this is what you are referring to?

I think so

> I still do not have the faintest clue what this would be for?
> 
> I mean, I just need to scale the image, the fbo and texture are obsolete once 
> I got my pixeldata from it. I do not need them around any more, they can be 
> overwritten, no problem?


GL is stateful -- when you set a state (i.e., when you bind an FBO), 
_everything_ from that point on will execute with that state (so if you leave 
the FBO bound, for example, everything that renders afterwards goes to your 
FBO, not to the screen -- not what you want).  conceptually it's like leaking, 
except that you alter behavior and likely get wrong results.

Similarly, QC might be using an FBO behind your back, so if you change it for 
your own operation, you _must_ put it back the way it was, or else when your 
function returns QC will believe it's still using its own FBO and not what you 
set (so you can't just bind to zero and expect it to be correct) -- you must 
_get_ what the current GL state is (via glGet*), change what you need, and then 
restore the state to what it was before you change it so that from everyone 
else's point of view nothing happened (things will continue to behave as 
expected).  This is just how GL stuff works - if that wasn't the case, then any 
time anyone called any function at all they'd have to expect that it could have 
modified the GL state, and they'd have a ton of restoration code to deal with 
it, which would be annoying.

--
Christopher Wright
christopher_wri...@apple.com

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list      (Quartzcomposer-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to