modify texture format name

This commit is contained in:
htl 2015-01-07 14:11:48 +08:00
parent c4cc6b5c34
commit e1fd472df1
1 changed files with 2 additions and 2 deletions

View File

@ -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