views:

183

answers:

2
+3  A: 

That 32 pixels are the missing ones to 512: 512 - 480 = 32. The reason is you can use only texture sizes that are powers of two with GL_TEXTURE_2D. So you have to round up your width and height to 512. You can still display only the part of the texture you want by using texture coordinates or by setting a texture matrix.

nschmidt
+1  A: 

The iPhone 3GS supports non power-of-two textures under certain conditions. All the following must be true:

  • GL_TEXTURE_WRAP_S should be set to GL_CLAMP_TO_EDGE
  • GL_TEXTURE_WRAP_T should be set to GL_CLAMP_TO_EDGE
  • Mipmapping must be turned off; minify with GL_LINEAR rather than GL_LINEAR_MIPMAP_LINEAR
prideout