-
-Pipeline::RenderTarget::RenderTarget(unsigned w, unsigned h, PixelFormat f)
-{
- color.set_min_filter(NEAREST);
- color.set_mag_filter(NEAREST);
- color.set_wrap(CLAMP_TO_EDGE);
- color.storage(f, w, h);
- fbo.attach(COLOR_ATTACHMENT0, color, 0);
-
- depth.set_min_filter(NEAREST);
- depth.set_mag_filter(NEAREST);
- depth.set_wrap(CLAMP_TO_EDGE);
- depth.storage(DEPTH_COMPONENT, w, h);
- fbo.attach(DEPTH_ATTACHMENT, depth, 0);
-
- fbo.require_complete();
-}
-
-
-Pipeline::MultisampleTarget::MultisampleTarget(unsigned w, unsigned h, unsigned s, PixelFormat f)
-{
- color.storage_multisample(s, f, w, h);
- fbo.attach(COLOR_ATTACHMENT0, color);
-
- depth.storage_multisample(s, DEPTH_COMPONENT, w, h);
- fbo.attach(DEPTH_ATTACHMENT, depth);
-
- fbo.require_complete();
-}
-