Custom Draw with shader

Ok, i can’t wrap my head around this problem.

So, what i have is basically a node with custom command and shader that uses glDrawArrays to draw. I’m also using VertexBuffer (cocos2d-x implementation wrapper) to upload vertices, uvs etc to GPU. On iOS and OS X everything works good. But on Android i have a problem with recreating GLProgramState. Looking at the ShaderTest.cpp i can see that EVENT_RENDERER_RECREATED is used to recreate GLProgram and GLProgramState, but it doesn’t work at all when using with VertexBuffer. Also it seems now that GLProgramState already has implementation for EVENT_RENDERER_RECREATED, but its not working.

Does anyone have any clues for a problem like this ?

I got it working finally. It seems that problem is when VBO is recreated (using VertexBuffer wrapper) for some reason when generating new vbo and uploading data again from saved buffer it looks like data is corrupted and not usable, so if i manually update vertices it works normally.