title: cocos2d-x-3.0 draw vs onDraw
body: <p>I'm using cocos2d-x v3.0 and in some test project I'm doing some custom drawing by overriding <code>Node</code>'s <code>draw</code> method, but in the DrawPrimitives example provided they do something like this:</p>
  
  <pre><code>void DrawPrimitivesTest::draw()
  {
      _customCommand.init(_globalZOrder);
      _customCommand.func = CC_CALLBACK_0(DrawPrimitivesTest::onDraw, this);
      Director::getInstance()-&gt;getRenderer()-&gt;addCommand(&amp;_customCommand);
  }
  
  void DrawPrimitivesTest::onDraw()
  {
      // drawing code here, why?
  }
  </code></pre>
  
  <p>From reading the header and source files it seems like this may be some way of sending render commands straight to the renderer, is that correct?</p>
  
  <p>Should I be using this method to do custom drawing? What's the difference between <code>draw</code> an <code>onDraw</code>?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>As @Pedro Soares mentioned, since Cocos2D-X 3.0 you can't override <code>draw()</code> anymore. you have to use <code>draw(Renderer *renderer, const kmMat4 &amp;transform, bool transformUpdated)</code> instead.</p>