+void Pipeline::create_targets(unsigned recreate)
+{
+ if(recreate>=2)
+ {
+ delete target[0];
+ delete target[1];
+ target[0] = 0;
+ target[1] = 0;
+ }
+ if(recreate>=1)
+ {
+ delete target_ms;
+ target_ms = 0;
+ }
+
+ PixelFormat color_pf = (hdr ? RGB16F : RGB);
+ RenderTargetFormat fmt = (RENDER_COLOR,color_pf, RENDER_DEPTH);
+ if(!postproc.empty() || samples)
+ {
+ if(!target[0])
+ target[0] = new RenderTarget(width, height, fmt);
+ if(!target[1] && postproc.size()>1)
+ target[1] = new RenderTarget(width, height, fmt);
+ }
+
+ if(!target_ms && samples)
+ target_ms = new RenderTarget(width, height, samples, fmt);
+}
+
+
+Pipeline::Pass::Pass(const Tag &t, Renderable *r):
+ tag(t),
+ lighting(0),
+ depth_test(0),
+ blend(0),
+ clipping(0),
+ renderable(r)
+{ }
+
+void Pipeline::Pass::set_lighting(const Lighting *l)
+{
+ lighting = l;
+}
+
+void Pipeline::Pass::set_depth_test(const DepthTest *d)
+{
+ depth_test = d;
+}
+
+void Pipeline::Pass::set_blend(const Blend *b)
+{
+ blend = b;
+}
+
+void Pipeline::Pass::set_clipping(const Clipping *c)
+{
+ clipping =c;
+}
+
+
+Pipeline::Slot::Slot(Renderable *r):
+ renderable(r)
+{ }
+