phaser icon indicating copy to clipboard operation
phaser copied to clipboard

creating multiple games and deleting them

Open hankeypancake opened this issue 12 years ago • 5 comments

Hi. I probably use phaser in a way it's not meant to be used, but since the 2.1.3 release I've been getting an issue where if I dynamically create more than 4 games, they only render as totally black when I use WebGL. If I use the canvas renderer everything is fine.

here's a (shitty) codepen to illustrate the issue: http://codepen.io/hankeypancake/pen/oHgxb

Am I not destroying the games properly or is this a totally wrong way of doing this?

Chrome console tells me: 'WARNING: Too many active WebGL contexts. Oldest context will be lost.'

hankeypancake avatar Oct 27 '14 17:10 hankeypancake

Hmmm I've done some further digging into this and even calling the Pixi renderer destroy methods in a local build, but it still happens, so I'm suspecting the Pixi destroy doesn't actually work. I'll need to confirm in a Pixi specific build and file as an issue there if true.

photonstorm avatar Oct 27 '14 20:10 photonstorm

I'm putting this down as a bug for now, because it definitely happens in my local test case, but I'm still convinced it's a Pixi level bug. Need more time to investigate.

photonstorm avatar Oct 28 '14 16:10 photonstorm

sure! I'm pretty sure it worked before bumping to 2.1.3. Thanks for the quick response (:

hankeypancake avatar Oct 28 '14 16:10 hankeypancake

It did, but Pixi changed massively in 2.1.3

photonstorm avatar Oct 28 '14 19:10 photonstorm

Thanks for your test case, it really helped me isolate and fix this!

photonstorm avatar Feb 11 '15 21:02 photonstorm