Skip to content

[GPU build] calcFrame() wrong order #232

Open
@DigiEggz

Description

@DigiEggz

In calcFrame(), the isBlitting() check sets the flashRect dimensions to zero in the incorrect order:

if (FlxG.render.isBlitting())
            {
                calcFramePixels();
                _flashRect.x = _flashRect.y = 0;
            }

In the blitting render this causes some alpha effects to not work correctly depending on a few factors. This can be resolved by moving the flashRect assignment to within the calcFramePixels() function.

protected function calcFramePixels():void
        {
            framePixels.copyPixels(_pixels, _flashRect, _flashPointZero);
            _flashRect.x = _flashRect.y = 0;//Reset rectangle before setting colorTransform

            if (_colorTransform != null)
            {
                framePixels.colorTransform(_flashRect, _colorTransform);
            }
        }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions