Search code examples
cocos2d-iphonecocos2d-x

Black background behind any CCLabelBMFont


I'm trying to render fnt fonts using the CCLabelBMFont class. The fnt has a PNG associated, with a transparent background.

The problem is that when I try to render any text, it always contains a black background, this black color is not in the PNG, and I can't find the way to remove it.

Any idea? Thanks.


Solution

  • it was that I did set the default alpha pixel format in a previous line of code...

    CCTexture2D::setDefaultAlphaPixelFormat(<#CCTexture2DPixelFormat format#>);