Using DrawingPrimitives ccDrawPoints uses different color than specified

I subclass CCNode and override the draw method. There I try to draw 4 points using the DrawingPrimitives functions. Instead of
seeing red dots on the screen, I see blue dots. Blue is the color used in another custom node when doing custom drawing using the Position_uColor shader program, but NOT using DrawingPrimitives. I looked under the hood of ccDrawColor4F and ccDrawPoints, and all looks fine, so I don’t think it’s a Cocos problem, rather I’m doing something wrong here. But, what? Thanks!

void MyClass::draw() {
ccDrawInit();
ccPointSize(5);
ccDrawColor4F(1,0,0,1); // sets red color
CCPoint points[] = {
ccp(10,0),
ccp(20,0),
ccp(30,0),
ccp(40,0)
};
ccDrawPoints(points,4);
ccDrawFree();
}

I see your code and it looks ok to me.

Perhaps you can try this

ccDrawColor4F(1.0f, 0.0f, 0.0f, 1.0f);

Instead of your call to ccDrawColor4F

Other than that it seems fine to me……