mbu
May 25, 2016, 8:29am
#1
Hello
I’ve made a simple shader program to scroll a texture and it works on desktop browsers and iOS. But when I’m running the same code on an android device (still browser) I get the following error:
CCGLProgram.js:151 Uncaught TypeError: locGL.createProgram is not a function
I’ve searched for solution and found this Can WebGL increase performance on mobile browser? , but it seems like CCBoot.js has been refactored since then.
Does anyone know what is wrong or how I can enabled WebGL on Android ?
This might help:
Hey guys,
We were trying to figure out why on WebGL capable android devices (os 5+) we couldn’t get cocos to run in WebGL rendering mode, and came across this in CCBoot.js
var shieldOs = [sys.OS_ANDROID];
that later fails WebGL detection in
if(userRenderMode === 2 || (userRenderMode === 0 && supportWebGL && shieldOs.indexOf(sys.os) === -1 && shieldBrowser.indexOf(sys.browserType) === -1))
Is there any reason for a shield like this? How can we make our web based game use WebGL advantages? An…
mbu
June 2, 2016, 12:53pm
#3
I don’t know where to change those properties.