codeperson
codeperson

Reputation: 8050

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 about this. Perhaps someone can provide an example or point me to some sample code?

Thanks in advance!

Upvotes: 1

Views: 1244

Answers (1)

tustvold
tustvold

Reputation: 148

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

Upvotes: 1

Related Questions