mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-01 15:52:40 +08:00
fix label rendering bug
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user