Webgl supported but not enabled on Nexus 7 - android

I have been trying to write an Android application which uses a Three.js WebGL renderer. For some reason, constructing the WebGL renderer caused an error on my Nexus 7, and after further investigation, I discovered that my device didn't seem to do get along with anything WebGL-related at all, and even Chrome didn't work with WebGL. When I visited get.webgl.org, it told me that WebGL seemed to be supported on my device, but wasn't enabled. I did some more research and found advice from several sources that told me that Nexus 7's do support WebGL, and that I should go to chrome://flags and select "Enable WebGL". Unfortunately, when I went to chrome://flags, there was no Enable WebGL option. Out of desperation, I tried enabling "WebGL 2.0 Prototype" and "WebGl draft extensions", hoping that this would fix the problem. Instead, Chrome ended up crashing and I ultimately had to reinstall the chrome app to get it working again. Anyway, the point is: What can I do to get WebGL working on my Nexus 7?

Firefox can render WebGL content on Nexus 7

You can try to override the software rendering list. Go to chrome://flags and Enable the Override software rendering list. It will solve the problem if your GPU is blacklisted by chrome.

Related

Android: how to exclude devices with webview that doesn't support webGL, i.e. are on the gpu_blacklist

I have an app containing a webview, that runs very poorly on devices where hardware acceleration doesn't work, e.g. some Samsung S4's running 5.0.1
I know from here:
Supporting WebGL on Android 5's WebView
that I can use Crosswalk and ignore the gpu blacklist, so that it will run smoothly.
However, this library causes other problems in the app, and- the blacklist is there for a reason right?
What I would like to do is exclude devices where webgl doesn't work for whatever reason. I've looked here:
https://developer.android.com/google/play/filters.html
but I'm not sure if there is a way to specify this.
I don't think filtering out devices without webGL is good idea. In fact your goal should be more and more devices install your app.
You should let everyone install your App and then when users try to run it and their device doesn't support webGL then you should show an alert telling them to troubleshoot this problem by them self.
If troubleshoot is not possible let them know why they cant use your app.
How to detect webGL support can found here
How to enable WebGL in Browser can found here, I have already answer this for Android in this thread

Enable WebGL in Android WebView

How to enable WebGL in WebView widget for Android 5.1.1 emulator? I checked WebGL status through Webglreport and the result was "This browser supports WebGL, but it is disabled or unavailable. Sometimes this is the result of older video drivers being rejected by the browser. Try updating your video drivers if possible".
I also tried to use Crosswalk webview on Android 4.4.4 emulator and there were same problems, but I fixed it by adding xwalk-command-line xwalk --ignore-gpu-blacklist. Is it possible to make something similar for standard WebView widget?
UPDATE: The WebView team says WebView does not allow gpu blacklist override, now or in future plans, due to security/stability risks: more details.
//
Chrome for Android 47 and Chromium/WebView 47 use different gpu blacklists and/or bug workarounds. What is allowed to successfully render in one may not be allowed to successfully render in the other even on the same hardware. Both browsers are scheduled to release updates to the Play Store every 6 weeks.
For example: I have a Nexus 10, Mali T-604 tablet (Lollipop 5.1.1. Also, Android Studio 1.5.1 with SDK 6.0 Marshmallow API 23 or 22).
In Chrome for Android --
chrome://flags, #ignore-gpu-blacklist NOT enabled, and all reset defaults
chrome://gpu, "graphics feature status-WebGL: Hardware accelerated" and Reset notification strategy 0x0000 surprisingly (see this last Crosswalk related) answer
webglreport, "This browser supports WebGL 1"
get.webgl.org, cube spins
In WebView --
webglreport, "This browser supports WebGL 1, but it is disabled or unavailable. Sometimes this is the result of older video drivers being rejected by the browser. Try updating your video drivers if possible."
get.webgl.org, "Hmm. While your browser seems to support WebGL, it is disabled or unavailable. If possible, please ensure that you are running the latest drivers for your video card."
chromium blacklist (link from Khronos WebGL blacklist wiki): "GPU rasterization and canvas is blacklisted on Nexus 10".
chromium bug list (link from Khronos WebGL blacklist wiki): "The Mali-Txxx driver does not guarantee flush ordering" and "The Mali-Txxx driver hangs when reading from currently displayed buffer".
The Pixel C tablet has a Nvidia Tegra X1 which does not appear on the chromium lists, and I've confirmed that it does support WebGL in WebView.

Enabling WebGL support for Android WebView

I need to display WebGL graphics in my webview. Is there any way to modify Android WebView to enable WebGL. If yes, How?
WebGL was not supported in WebViews before Android Lollipop. In KitKat, Android switched to Chromium as the native WebView implementation, but it is locked to Chromium 33, with no WebGL. In Lollipop, WebView is updated via the Play Store, and now supports WebGL. (source: https://developer.chrome.com/multidevice/webview/overview)
Trying to extend WebView to support it is next to impossible.
One thing you might consider, is use CSS 3D transformations instead of WebGL, those are supported on Android ICS and forward, see http://caniuse.com/#feat=transforms3d
WebGL is not supported in current Android webview, you can however use crosswalk-project which is a web runtime that supports WebGL and package it in a android app along with your WebGL app. The latest Intel XDK supports building Android apps with crosswalk runtime.
You can view WebGL on new Android devices using the Chrome Beta app or Firefox beta app. The only device I have tested and this worked on is the Asus Nexus 7 tablet running Android 4.2.2.
My Motorola Razr running Android 4.1.2 does not support WebGL with google Chrome Beta.
Not sure if this directly helps.. but FYI.
Although it is not possible to enable WebGL for Android WebView, there is an option to have native apps using WebGL for rendering using CocoonJS by Ludei (www.ludei.com). They even have a demo app in Google Play to show some known WebGL demos running even in Android 2.3 devices.
https://play.google.com/store/apps/details?id=com.ludei.demos.webgl
Even running on OUYA!
http://www.youtube.com/watch?v=ypyqkAo1jgo
I have chrome version 28.0 on OS 4.2.2 WebGl is not enabled by default you need to enable it by typying chrome://flags/ in seach bar just the way shwn in pic below
Once you have enabled web gl relaunch chrome and you will be able to run most of three.js experiments . I have shared screenshots for few :-
I also tried everything on webview but I was unable to set webgl flags. Probably it is not possible to use webgl in webviews .

What android browser is capable of transmitting multitouch events?

I've got a new Samsung Note that has a lot of touch points accessible via the hardware...but I can't seem to get 2 simultaneous touch events registered in the browser, tried quite some demo apps I've found online. (there's a bunch of them listed in this presentation)
I also tried various browsers: Firefox (beta), the default browser, and Dolphin HD... but neither seems to be able to get it right.
Anybody else got this working perhaps, or knows why it doesn't?
Thanks a lot in advance,
Jochen
Opera Mobile 11 supports multitouch.
It's possible that Samsung has customized WebKit on the Note and broke multi-touch handling. Good luck getting definitive answers on that either way.
But, does this page help?
According to http://www.html5rocks.com/en/mobile/touch.html
Android 2.3.3 (which should be very close to the one Galaxy Note uses, 2.3.6) does not support multitouch in the browser.
You may want to try Firefox for Android (I haven't tried that).
Have a go at this MultiTouch Polyfill. It enables you to create a multitouch enabled WebView - which most android 2.x devices (such as the Samsung Note) don't have by default despite the device registering more.
Haven't tested it with the mentioned demo apps from the presentation, but i can say it works for the scripty2 Touchspector as well as pinch zooming OpenLayers and Google Maps.
If this will be helpful, i'd be happy to bundle it up as browser application and put it on the market so you have something to test touch applications with on a 2.x device.
Chrome beta works too! Perhaps even better than Opera Mobile...but slower.

Where is the hardware acceleration in the ICS Emulator?

I thought this was on the way, anybody know how to enable it?
Seems that I can't get a GLES2.0 context inside the emulator either, but maybe that's just me. IllegalArgumentException: No configs match from the egl.
However, the GLES20 API Demo included seems to run.
Anyways, even so, none of it seems accelerated or fast then old emulators. Nice update though.
In Android SDK Tools R15 you can enable GPU emulation in 4.0.3 Image.
You need to create a new emulator virtual device and set GPU emulation to true in Hardware properties.
The emulator in ICS doesn't include hardware acceleration.
(The bug to provide that is still open: http://code.google.com/p/android/issues/detail?id=6816)
That said, it does allow hardware acceleration for apps when they're running on a phone. (This feature was actually introduced in Honeycomb for tablets.)
The Android SDK Add hw.gpu.enabled hardware property on August 26, 2011's commit.
"the emulator can (sort of) do emulation but you need a system image
that supports it. We haven't released any yet. If it was ready we would have announced it." said with Xavier Ducrohet On Oct 20, 2011.
Ice cream sandwich gpu emulation issue.
As of now, I can't find a system image supports it.

Categories

Resources