cocos2d-x 3.x openGL getting Error

96 Views Asked by At

I'm trying now migration cocos2d-x v2 to cocos2d-x v3.x.

CC_ENABLE_DEFAULT_GL_STATES();

glBindTexture(GL_TEXTURE_2D, m_pobTexture->getName());

glVertexPointer(2, GL_FLOAT, 0, vertices);
glTexCoordPointer(2, GL_FLOAT, 0, texCoords);
glColorPointer(4, GL_UNSIGNED_BYTE, 0, colorArray);
glDrawArrays(GL_TRIANGLES, 0, numVertices*3);

how can i change this? all lines are getting error...

1

There are 1 best solutions below

0
On

The easiest way is:-

  1. Make a new project in v3.x version
  2. Replace the "classes" folder of this newly created project with your old project that was in v2.x version.
  3. Solve syntax/semantics error.