Primitives and sprites Z index in Cocos2D-x 3.0 is not consistent?
I have two layers. Each layer has a primitive drawing in it with OpenGL like this: void Layer1::drawPolygon() { glLineWidth(1); DrawPrimitives::setDrawColor4B(255,255,255,255); DrawPrimitives::setPointSize(1); // Anti-Aliased glEnable(GL_LINE_SMOOTH); // filled poly glLineWidth(1); Point filledVertices[] = { Point(10,120), Point(50,120), Point(50,170), Point(25,200), Point(10,170) }; DrawPrimitives::drawSolidPoly(filledVertices, 5, Color4F(0.5f, 0.5f, 1, 1 ) ); } When I addChild these layers to a scene and set Z orders 1 and 2, I see that I can bring one primitive on top of another and vice