Drawing OpenGL Primitives
Sometimes in 2D game development we need to make use of good old-fashioned OpenGL primitives. With these we can make minimaps, heads up displays, and special effects like bullet tracers and lightning blasts to name a few.
In the following scene I’ve created a simple figure using all of the primitive drawing functions supplied by Cocos2d as well as one I’ve tweaked and added.