Browser widget does not suppüort WebGL2

Bringing the internet highway into your project? Building FTP, HTTP, email, chat or other client solutions?

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
TorstenHolmer
Posts: 28
Joined: Mon Oct 28, 2013 1:23 pm
Location: Dresden, Germany

Browser widget does not suppüort WebGL2

Post by TorstenHolmer » Sun Aug 16, 2020 12:33 pm

Hi,

I want to test how to display a WebGL-Page in the browser widget, but get this message on this page (https://get.webgl.org/webgl2/) :

"Oh no! We are sorry, but your browser does not seem to support WebGL2."

Is there a way to update the widget?

Chrome does support WebGL 2.0

Cheers,
Torsten

Klaus
Posts: 11969
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Browser widget does not suppüort WebGL2

Post by Klaus » Sun Aug 16, 2020 12:43 pm

Hi Torsten,

I also get this message on my Mac 10.14.6 with the latest Safari 13.1.2!

Since the browser widget uses the underlying OS web engine (at least on the Mac = Webkit, no idea about Win and Linux)
there is no way to "update" the widget.


Best

Klaus

TorstenHolmer
Posts: 28
Joined: Mon Oct 28, 2013 1:23 pm
Location: Dresden, Germany

Re: Browser widget does not suppüort WebGL2

Post by TorstenHolmer » Mon Aug 17, 2020 5:03 pm

Hi Klaus,

the problem with Safari in macOS is that WebGL is off by default, but can be activated via developer mode:
German version: Menü / Entwickler / Experimentelle Funktionen / WebGL 2.0
Then it works!

I have found this discussion about how to enable WebGL in macOS apps:
https://stackoverflow.com/questions/136 ... -on-webkit

The solution is the following:
You need to set the user preference WebKitWebGLEnabled to @YES for your app. To have the setting apply the first time the app is run, it needs to be set early, before the WebView is initialized. In my case, the WebView instance is loaded from the main nib file, so that's very early indeed. I added this code to Supporting Files/main.m:

[[NSUserDefaults standardUserDefaults] setObject:@YES
forKey:@"WebKitWebGLEnabled"];
So, there is a way for Objective C apps in macOS to enable WebGL for the WebView component. Therefore it should be possible to enable this in the Livecode browser, too?

Cheers,
Torsten

Post Reply

Return to “Internet”