Forum > C++ > Problem to port some cocos2d-iphone code to cocos2d-x

Problem to port some cocos2d-iphone code to cocos2d-x

By bagusflyer Posted 2013-01-17 05:12 Comments 2
bagusflyer
  • Posts: 98

I have some cocos2d-iphone code to port to cocos2d-x code. But I got some problems for the following code:

glDisableClientState(GL_COLOR_ARRAY);
glColor4ub( getColor().r, getColor().g, getColor().b,getQuad().bl.colors.a);

The error messages are:

Use of undeclared identifier ‘GL_COLOR_ARRAY’
Use of undeclared identifier ‘glColor4ub’

Can anybody tell me the reason and what should I do? Thanks in advance.

walzer
  • Posts: 1735
  • Location: Xiamen, China

#1 RE: 2013-01-17 10:21

  • Platform
  • SDK version
  • which version of cocos2d-x These info are required for your question.

Less is More. Keep Focus.

bagusflyer
  • Posts: 98

#2 RE: 2013-01-17 11:34

Zhe Wang wrote:

* Platform
* SDK version
* which version of cocos2d-x
These info are required for your question.

Platform: iOS, I’m using xcode 4.5.2
cocos2d-x version: 2.0.4
SDK version: iOS 6.0.1

Loggin to reply

Copyright © 2010 - 2013 Cocos2d-x.orgClustrmaps