copypixels blending bug?


    Jul 31 2006 | 2:35 pm
    When using "copypixels" I always have to disable blending beforehand, because otherwise the copied pixels are blending with the glclearcolor.
    draw() { sketch.glclear(); sketch.gldisable("blend"); sketch.copypixels(Patterns, 0, 0);
    refresh(); }
    Patterns can be another sketch instance or an Image. Same problem. Is this expected behavior or a bug maybe? I know this isn't a proper bugreport so if it's not something I'm missing I'll make an example script.
    -thijs
    using winmax 4.5.7 jitter 1.5.2

    • Jul 31 2006 | 4:09 pm
      On Jul 31, 2006, at 7:35 AM, Thijs Koerselman wrote:
      > When using "copypixels" I always have to disable blending > beforehand, because otherwise the copied pixels are blending with > the glclearcolor. > > draw() > { > sketch.glclear(); > sketch.gldisable("blend"); > sketch.copypixels(Patterns, 0, 0); > > refresh(); > } > > Patterns can be another sketch instance or an Image. Same problem. > Is this expected behavior or a bug maybe?
      This isn't a bug, but rather a feature. When blending is enabled we respect the alpha channel of the source image, or if the source is an instance of sketch, an alpha channel with the alpha value of the current draw color is used.
      -Joshua
    • Jul 31 2006 | 5:10 pm
      Ah I see, it was glcolor then. I was already getting strange behavior with the alpha of some content depending on the drawing of other things, and this explains all. Thanks for clearing this up, I should have checked the manual about copypixels cause its all in there.
      -thijs
      On 7/31/06, Joshua Kit Clayton wrote: > > > > This isn't a bug, but rather a feature. When blending is enabled we > respect the alpha channel of the source image, or if the source is an > instance of sketch, an alpha channel with the alpha value of the > current draw color is used. > > -Joshua > >