在cocos2d 2.0 使用SneakyInput 遇上问题(GL_TEXTURE_COORD_ARRAY) E

我用的是cocos2d的2.0
使用SneakyInput时
Error logs:
Use of undeclared identifier ‘GL_COLOR_ARRAY’
Use of undeclared identifier ‘GL_TEXTURE_COORD_ARRAY’

http://blog.csdn.net/penguinprogramer/article/details/8252941

这个人跟我遇上一样的问题,但我看不懂要把他那三段码放哪里。 。 。 。求助

//???

  • (void)draw{ //glDisableClientState(GL_TEXTURE_COORD_ARRAY); //glDisableClientState(GL_COLOR_ARRAY); //glDisable(GL_TEXTURE_2D); //glVertexPointer(2, GL_FLOAT, 0, circleVertices_); //glColor4f(color_.r/255.0f, color_.g/255.0f, color_.b/255.0f, opacity_/255.0f); ccGLEnableVertexAttribs( kCCVertexAttribFlag_Position | kCCVertexAttribFlag_Color ); glDisableClientState(GL_TEXTURE_COORD_ARRAY); glDisableClientState(GL_COLOR_ARRAY); glDisable(GL_TEXTURE_2D); glVertexPointer(2, GL_FLOAT, 0, squareVertices_); glColor4f(color_.r/255.0f, color_.g/255.0f, color_.b/255.0f, opacity_/255.0f); BOOL newBlend = NO; if( blendFunc_.src != CC_BLEND_SRC || blendFunc_.dst != CC_BLEND_DST ) { newBlend = YES; glBlendFunc(blendFunc_.src, blendFunc_.dst); }else if( opacity_ == 255 ) { newBlend = YES; glBlendFunc(GL_ONE, GL_ZERO); }else{ newBlend = YES; glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); } glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); if( newBlend ) glBlendFunc(CC_BLEND_SRC, CC_BLEND_DST); // restore default GL state glEnableClientState(GL_TEXTURE_COORD_ARRAY); glEnableClientState(GL_COLOR_ARRAY); glEnable(GL_TEXTURE_2D); // restore default GL state //glEnableClientState(GL_TEXTURE_COORD_ARRAY); //glEnableClientState(GL_COLOR_ARRAY); //glEnable(GL_TEXTURE_2D); }