- tgt.texture = new Texture2D;
- tgt.texture->storage(pf, width, height, 1);
- Sampler &sampler = tgt.texture->get_default_sampler();
- sampler.set_filter(NEAREST);
- sampler.set_wrap(CLAMP_TO_EDGE);
- fbo.attach(att, *tgt.texture);
+ Texture2D *tex2d = new Texture2D;
+ tex2d->storage(pf, width, height, 1);
+ fbo.attach(att, *tex2d);
+ textures.push_back(tex2d);