Book Image

Cocos2d-X Game Development Blueprints

By : Karan Sequeira
Book Image

Cocos2d-X Game Development Blueprints

By: Karan Sequeira

Overview of this book

Table of Contents (17 chapters)
Cocos2d-x Game Development Blueprints
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Chapter 6. Creativity with Textures

In this chapter, we will take a leap into a new direction and take things to the next level. You will learn how to programmatically generate textures and bind them to shapes so that they can be used in the game. Cocos2d-x is so flexible that it allows us to run our own rendering commands and we will take advantage of this fact.

In this chapter, you'll learn:

  • How to use the CCRenderTexture class to draw into a texture

  • How to apply various graphical effects to a texture to add aesthetics

  • How to create a curved Box2D terrain

  • How to apply a texture to a curve