copypixels blending bug?

Jul 31, 2006 at 2:35pm

copypixels blending bug?

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

#26987
Jul 31, 2006 at 4:09pm

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

#81243
Jul 31, 2006 at 5:10pm

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
>
>

#81244

You must be logged in to reply to this topic.