[HTML, WebOS browser, LG Smart TV] Starling examples not shown in TV browser

Same wit Away3D. I guess it related to stage3d.
How ever I can open other pure webgl samples found by google.

Does BunnyMark work?

(If not) Does it work if you build using -Dcanvas?

Does it work if you build using -Dwebgl1?

Thanks :slight_smile:

BunnyMark works, but it doesn’t use stage3D.
Starling samples doesn’t work and Away3D too.

Did -Dwebgl1 make a difference? Could you try -Dopenfl-share-context also?

openfl-samples\8,7,0\demos\BunnyMark>haxelib run openfl test html5 -debug -Dwebgl1 - works
openfl-samples\8,7,0\demos\BunnyMark>haxelib run openfl test html5 -debug -Dopenfl-share-context - works

No visual differences

If I use -Dopenfl-share-context in starling project i can see at least OpenFL stage until I call starling.start(); but even in this case I have ti invalidate stage each frame:

addEventListener(Event.ENTER_FRAME, e -> {
       invalidate();
});

if I do not use -Dopenfl-share-context, then OpenFL stage freezes even with invalidate on ENTER_FRAME.

When I call starling.start(); - everything disappears in both above cases.

-Dopenfl-share-context asks Stage3D to use the same context as the OpenFL display list rather than using its own framebuffer (which helps with some behaviors). If these don’t work and there is no log message then I am not exactly sure what is going on.

I would try the Starling demo and perhaps trace and see how far it is getting? I wonder if there’s a way to enable more diagnostic information from the OS?

Curious though since OpenFL uses WebGL for the display list (unless its falling back to canvas?)

I’ll try to setup system to receive more detailed logs

Everything disappears, wher render method is called of Starling instance.
Settings up WebOS emulator to PC. Hope it’ll help

Well, I was able to launch Starlign samples via LG WebOS emulator. However with version 3 only, because in 4th verson of emulator there is no browser installed and I don’t know where to find IPK installer of default browser.
However I still didn’t find any info if it is possible to debug real TV. And Stage3D stuff doesn’t work on my both LG TVs with WebOS 4.

Investigating…

@singmajesty I’ve managed to receive error log! The same issue with Samsung Galaxy J3

"[openfl.display3D.Program3D] ERROR: Error compiling fragment shader
ERROR: 0:3: 'highp' : precision is not supported in fragment shader

// AGAL fragment shader
#version 100
precision highp float;
varying vec4 v0;
uniform sampler2D sampler0;
void main() {
	vec4 ft1;
	ft1 = texture2D(sampler0, v0.xy); // tex
	gl_FragColor = ft1; // mov
}
"

Can you help or forward to Starling guy to help?
May be it should be fixed in AGALConverter?

UPD: Success!! It works if I change this line
glsl.add("precision highp float;\n"); to this glsl.add("precision mediump float;\n"); in AGALConverter!
There should be correct condition to handle that. Can you help?

UPD: Adding this to AGALConverter before glsl.add(prefix); fixes issue:

var prefix = "#ifdef GL_ES
			#ifdef GL_FRAGMENT_PRECISION_HIGH
			precision highp float;
			#else
			precision mediump float;
			#endif
			#endif
			";

Good find!

1 Like