What happened with cc.GlProgram?

Hi there, first time posting.

I was wandering what happened with cc.GLProgram ? In cocos creator v2.0.5 it’s not working anymore, it worked in earlier v1.10.

This works in v1.10, but not in v2.0.5

let glProgram = new cc.GLProgram();

Thanks in advance.

@jare can you tell us?

We completely rewrote the underlying renderer in v2.0, so the GLProgram is removed.
See https://github.com/cocos-creator/creator-docs/blob/next/en/release-notes/upgrade-guide-v2.0.md for more details about changes of v2.0.
We are developing a new Material/Effect System for custom rendering support.

1 Like

So how do we write shaders in v2.0 then, is there a way ? How soon will Material/Effect System going to come, should I revert to 1.10 then ? I like new upgrades that come with v2.0, but if there is no way to use shaders for now, I would probably revert to older verison.

You can use https://github.com/ShawnZhang2015/ShaderHelper

2 Likes

Thanks jare, this is what I needed. Cudos. :+1:

Hi Jare,
I would like to know if those shaders can work also with spine renderer after a small tweak? I don’t know a lot about shaders unfortunately, so will appreciate some help. Or in general if the shader affects everything rendered below it and not only attached texture, that will help me a lot.

Wow, awesome!