+ // Render the effect chain to the given set of textures. This is equivalent
+ // to render_to_fbo() with a freshly created FBO bound to the given textures,
+ // except that it is more efficient if the last phase contains a compute shader.
+ // Thus, prefer this to render_to_fbo() where possible.
+ //
+ // Only one destination texture is supported. This restriction will be lifted
+ // in the future.
+ //
+ // All destination textures must be exactly of size <width> x <height>,
+ // and must either come from the same ResourcePool the effect uses, or outlive
+ // the EffectChain (otherwise, we could be allocating FBOs that end up being
+ // stale). Textures must also have valid state; in particular, they must either
+ // be mipmap complete or have a non-mipmapped minification mode.
+ //
+ // width and height can not be zero.
+ struct DestinationTexture {
+ GLuint texnum;
+ GLenum format;
+ };
+ void render_to_texture(const std::vector<DestinationTexture> &destinations, unsigned width, unsigned height);
+