mirror of https://github.com/axmolengine/axmol.git
modify texture format name
This commit is contained in:
parent
c4cc6b5c34
commit
e1fd472df1
|
@ -370,7 +370,7 @@ function display.newSprite(source, x, y, params)
|
|||
sprite = spriteClass:create(source, params.rect, params.capInsets)
|
||||
end
|
||||
if display.TEXTURES_PIXEL_FORMAT[source] then
|
||||
cc.Texture2D:setDefaultAlphaPixelFormat(cc.TEXTURE2D_PIXEL_FORMAT_RGBA8888)
|
||||
cc.Texture2D:setDefaultAlphaPixelFormat(cc.TEXTURE2_D_PIXEL_FORMAT_BGR_A8888)
|
||||
end
|
||||
break
|
||||
elseif sourceType ~= "userdata" then
|
||||
|
@ -495,7 +495,7 @@ function display.loadSpriteFrames(dataFilename, imageFilename, callback)
|
|||
spriteFrameCache:addSpriteFramesAsync(dataFilename, imageFilename, callback)
|
||||
end
|
||||
if display.TEXTURES_PIXEL_FORMAT[imageFilename] then
|
||||
cc.Texture2D:setDefaultAlphaPixelFormat(cc.TEXTURE2D_PIXEL_FORMAT_RGBA8888)
|
||||
cc.Texture2D:setDefaultAlphaPixelFormat(cc.TEXTURE2_D_PIXEL_FORMAT_BGR_A8888)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue