Pixel Writing Bug in Safari

29 views
Skip to first unread message

Jon Grant

unread,
Jun 25, 2015, 10:25:32 AM6/25/15
to fla...@googlegroups.com
Having this issue in my app in mobile and desktop Safari only:

_filltexture = System.renderer.createTexture(960, 560);
var fillEnt:Entity = new Entity().add(new FillSprite(0xffffff, 960, 560));
Sprite.render(fillEnt, _filltexture.graphics);
_drawContainer.addChild(new ImageSprite(_filltexture));

If I want to copy an imge to the fill texture, I do so with _filltexture.graphics.drawTexture, and this works great 

BUT...

If i ever call _filltexture.readPixels, _filltexture.graphics.drawTexture no longer draws anything

Again this is Safari only.


Ideas?

Jon Grant

unread,
Jun 25, 2015, 10:56:25 AM6/25/15
to fla...@googlegroups.com
In the meantime - I've fixed by not reading pixels, but creating a 1px colored texture that I drawTexture onto the fill texture many times.

Jon Grant

unread,
Jun 29, 2015, 2:25:24 PM6/29/15
to fla...@googlegroups.com
Update - this isn't just safari but iOS in chrome too - no idea why but some browsers won't drawTexture after the readPixels call.  In the end drawing may 1px textures was too slow, so I readpixels, write pixels, make a copy and replace the old texture, which is then OK to draw textures on
Reply all
Reply to author
Forward
0 new messages