X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=effect_chain.h;h=db3b87006100b09820687efab1ba0bca6c699484;hp=407648bc9c5a6887e331d01bb4d372390509c219;hb=cf1beb1c14061e754483f99a245ecfdde5cb7b79;hpb=7d78534e38d50892ca57d3a17f27214ac094ea58 diff --git a/effect_chain.h b/effect_chain.h index 407648b..db3b870 100644 --- a/effect_chain.h +++ b/effect_chain.h @@ -6,6 +6,16 @@ // them. Generally you set up your effect chain once and then call its render // functions once per frame; setting one up can be relatively expensive, // but rendering is fast. +// +// Threading considerations: EffectChain is “thread-compatible”; you can use +// different EffectChains in multiple threads at the same time (assuming the +// threads do not use the same OpenGL context, but this is a good idea anyway), +// but you may not use one EffectChain from multiple threads simultaneously. +// You _are_ allowed to use one EffectChain from multiple threads as long as +// you only use it from one at a time (possibly by doing your own locking), +// but if so, the threads' contexts need to be set up to share resources, since +// the EffectChain holds textures and other OpenGL objects that are tied to the +// context. #include #include