WebGL on LG webOS

Hello,

I have tested on LG webOS TV the simple webGL test app - just empty scene filled with red color:

import * as Phaser from 'phaser'

class EmptyScene extends Phaser.Scene
{
    sceneWidth : number = 0;
    sceneHeight : number = 0;
    constructor()
    {
        super( 'Empty' )
    }

    preload()
    {
        // Scene size
        this.sceneWidth = this.game.config.width as number;
        this.sceneHeight = this.game.config.height as number;
    }

    // --------------------------------------------------
    //
    // Create game objects
    //
    // --------------------------------------------------
    create()
    {
        let background = this.add.graphics( {x: 0, y: 0} );
        background.fillStyle( 0xFF0000 );      
        background.fillRect( 0, 0, this.sceneWidth, this.sceneHeight );
    }

    update( time: any, delta: any )
    {
    
    }
}

export default EmptyScene;

It works fine when I use canvas with 2d context, but when I enable webGL context I see only black screen, no logs, simple anything… in the Chrome remote debug console (see the screenshot). Sometimes it “crashes” the TV and the only way to start it is to remove it from power plug.

  • I have tested it on TV with the recent webOS version 7.3.1
  • TV surely supports the webGL (I can create canvas with webGL context without using Phaser and manually draw something simple), also three.js works there.
  • On some much older LG TVs (e.g. webOS version 4.4.0) the test app with enabled webGL context works without any problems, but on several newer not - I have not found any pattern where it works and where not.
  • Is there a way to find out what is wrong (e.g. some phaser debug build with logs, some test up, that enables and tests one “webGL” feature after another, etc) and possibly fix it or the only solution is not to use webGL?

Thanks a lot
STeN

If there’s no console error I think this might be hard to figure out. :frowning: You could add a console log in the scene to see if the game even finished booting.

There’s also just

new Phaser.Game({ backgroundColor: 0xff0000 });

You might try adding

defaultPipeline: 'MobilePipeline'

to the game config to see if it makes any difference.