title: Cocos2d-x - Error drawing cubic bezier curves
body: <p>I'm trying to draw a cubic bezier path with a certain thickness, but the curve appears like a sequence of disconnected segments (3 in my case). This is a screenshot (the blue circles are the control points of the curve).</p>
  
  <p><img src="https://i.stack.imgur.com/cmDV6.png" alt="Cubic bezier curve"></p>
  
  <p>I noticed that the same effect occurs in the 'draw primitives' in the cocos2d-x tests. Anyway I'm pretty sure there should be a workaround but I'm not able to find it by myself. 
  Furthermore the line is affected by the aliasing effect and I am not sure how to apply an alpha shadow to avoid it.</p>
  
  <p>This is the code I used:</p>
  
  <pre><code>glLineWidth(24.0f);
  
  Vec2 cp1 = Vec2(200, 200);
  Vec2 cp2 = Vec2(1300, 150);
  Vec2 cp3 = Vec2(170, 1200);
  Vec2 cp4 = Vec2(1400, 1000);
  
  //Draw control points
  DrawPrimitives::setDrawColor4B(0, 0, 255, 255);
  DrawPrimitives::drawSolidCircle(cp1, 50, 360, 120, 1, 1);
  DrawPrimitives::drawSolidCircle(cp2, 50, 360, 120, 1, 1);
  DrawPrimitives::drawSolidCircle(cp3, 50, 360, 120, 1, 1);
  DrawPrimitives::drawSolidCircle(cp4, 50, 360, 120, 1, 1);
  
  //Draw cubic red bezier curve
  DrawPrimitives::setDrawColor4B(255, 0, 0, 255);
  DrawPrimitives::drawCubicBezier(cp1, cp2, cp3, cp4, 50);
  </code></pre>