fix label rendering bug

This commit is contained in:
Huabing.Xu
2016-08-16 10:43:09 +08:00
parent 1bfce7c1cb
commit ccf41f1fd1
2 changed files with 5 additions and 2 deletions
@@ -471,7 +471,7 @@
}
this._texture._textureLoaded = false;
this._texture.handleLoadedTexture();
this._texture.handleLoadedTexture(true);
};
proto._rebuildLabelSkin = function () {
@@ -105,7 +105,10 @@ proto.uploadData = function (f32buffer, ui32buffer, vertexDataOffset) {
// Fill in vertex data with quad information (4 vertices for sprite)
// Use 255 because color has been set when baking label
this._color[0] = ((this._displayedOpacity<<24) | (255<<16) | (255<<8) | 255);
// premultiplied alpha is used for labelTTF and system font
var opacity = this._displayedOpacity;
this._color[0] = ((opacity<<24) | (opacity<<16) | (opacity<<8) | opacity);
var z = node._vertexZ;
var vertices = this._vertices;