Problem when creating cc.GLProgramm()

Problem when creating cc.GLProgramm()
0.0 0

#1

So I tried to create a cc.GLProgramm by using source from git. Unfortunately there is quite a weird problem which seems to have to do with inner classes of cocos:

    Uncaught TypeError: locGL.createProgram is not a function
cc.GLProgram.cc.Class.extend.initWithVertexShaderByteArray 
@ CCGLProgram.js:146cc.GLProgram.cc.Class.extend.initWithVertexShaderFilename 
@ CCGLProgram.js:200cc.Layer.extend.ctor @ layerBlur.js:7(anonymous function) 
@ CCClass.js:128Class 
@ CCClass.js:90cc.Scene.extend.onEnter 
@ menuScene.js:11(anonymous function) 
@ CCClass.js:128cc.Director.cc.Class.extend.setNextScene 
@ CCDirector.js:545cc.Director.cc.Class.extend.drawScene
...

Maybe somone can recreate this issue by using this code from git: https://gist.github.com/mutoo/f9f2144faae570ec5462


#2

Sad that nobody can help me with this.
I did some debugging in the loaded Cocos-JS Library and obviously the function createProgramm is not defined in the Variable locGL, which is a reference to the glContext. Is this a real bug or is there any solution?


#3

Can’t help you directly, but you could look at the openGL test where a custom shader is implemented.


#4

Thanks but I figured out the problem elsewhere.
If you run your Cocos2d-js application in chromes developer tools, shaders won’t work. So just turning off developer tools and all shaders work fine…


#5

still not work(v3.13)