Merge pull request #6779 from jonseg/cpp-template-error

Vector2 replaced by Vec2 in cpp-template
fix memory leak for GLProgramState create logic
Merge pull request #6781 from dabingnn/v3_work

V3 work