开发者

Drawing custom shapes in an iOS game built upon cocos2d

I'm looking to draw a custom shape (say, a solid rectangle) using openGL ES in an iOS game built upon the Cocos2d framework. In another StackOverflow question, I saw a suggestion to use [CCDirector sharedDirector].openGLView; however, I am unsure as to how to go ab开发者_如何学编程out this. Perhaps someone can provide an example or point me to some sample code?

Thanks in advance!


There are two tutorials I can recommend for doing this, depending on what exactly you are trying to achieve.

Generating Textures using CCRenderTexture - here

Generating Textures using OpenGL - here

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜