I'm a newbie in Cocos2d. I try to draw a simple line in Cocos2d:
-(void)draw
{
[super draw];
glColor4ub(0,0,0,255);
glLineWidth(2);
glColor4f(1.0, 1.0, 0.5, 1);
ccDrawLine(ccp(0,100), ccp(320,150));
}
but that shows the warning:
HelloWorldScene.m:70:5: Implicit declaration of function 'glColor4ub' is invalid in C99 HelloWorldScene.m:72:5: Implicit declaration of function 'glColor4f' is invalid in C99 HelloWorldScene.m:73:5: Implicit declaration of function 'ccDrawLine' is invalid in C99