Dealing With Incorrectly Shaped Textures In OpenGL ES

 As you may know, OpenGL ES requires that supplied textures be created in powers of 2. 

It can be a pain to convert many textures, and not wanting to do so programmer Craig Giles decided to look through some of Apple’s own source code and come up with a solution.  The eventual solution is to stretch the texture until it is a power of two, and then perform an affine transform if the texture ends up exceeding the texture size limitations.

Check out OpenGL ES Texture2D:Power of Two for the full post including code snippets and an explanation.

[Source: Journey To XNA]

 

Getting started with iPhone and iPad development, and looking for a straightforward guide to get you started with Objective-C fast as possible?
Click here to check out a great straightforward no-nonsense guide to getting started with iPhone development as fast as possible.

Share and Enjoy:
  • RSS
  • Twitter
  • Facebook
  • DZone
  • HackerNews
  • del.icio.us
  • FriendFeed

Random Posts

Leave a Reply

blog comments powered by Disqus