How to display a image from url

How to display a image from url
0.0 0



I get my sina weibo avatar url from my server, And I want to display it in my game.

In objective-c in ios, I can easy do it with a third-party lib, and display it just with one line code such as imageWithUrl(“http://xxxxx”)

My question is how to display this image from url in cocos2d-x?

thanks very much

  1. save the image data in a buffer
  2. create CCImage from this buffer
  3. create CCTexture2D from this CCImage object
  4. create CCSprite from CCTexture2D