Skip to content

Instantly share code, notes, and snippets.

@Sumolari
Last active May 2, 2019 22:13
Show Gist options
  • Save Sumolari/39c5d9400f7325ac0c2a to your computer and use it in GitHub Desktop.
Save Sumolari/39c5d9400f7325ac0c2a to your computer and use it in GitHub Desktop.
Set texture wrap mode in Cocos2d-x
cocos2d::Texture2D::TexParams texParams = {
GL_NEAREST, // TextureMinFilter
GL_NEAREST, // TextureMagFilter
GL_CLAMP_TO_EDGE, // TextureWrapMode Horizontal
GL_CLAMP_TO_EDGE // TextureWrapMode Vertical
};
this->getTexture()->setTexParameters( texParams );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment