Skip to content

Instantly share code, notes, and snippets.

@lucholaf
Created June 25, 2012 12:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lucholaf/2988188 to your computer and use it in GitHub Desktop.
Save lucholaf/2988188 to your computer and use it in GitHub Desktop.
mip maps
void generateMipMaps(CCTexture2D *texture)
{
if ([[UIScreen mainScreen] scale] > 1)
{
[texture generateMipmap];
ccTexParams texParams = { GL_LINEAR_MIPMAP_LINEAR, GL_LINEAR, GL_CLAMP_TO_EDGE, GL_CLAMP_TO_EDGE };
[texture setTexParameters:&texParams];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment