2

Pixmap在用三星 GT-N5100 绘制纹理时遇到问题。

public class PixmapHelper{

    static Pixmap mapHelper;
    static Pixmap miniObject;


    public static void Initialize()
    {
       mapHelper=AssetLoader.GetPixmap(Settings.TEX_MAP_OBJECTS);
       miniObject=new PixMap(4,4,Pixmap.Format.RGB888);
       mapHelper.setBlending(Pixmap.Blending.None);
       miniObject.setBlending(Pixmap.Blending.None);
    }

    public static void Draw(TextureRegion textureRegion,Texture dstTexture,int dstX,int dstY)
    {
        miniObject.drawPixmap(mapHelper,0,0,textureRegion.getRegionX(),textureRegion.getRegionY(),
        textureRegion.getRegionWidth (),textureRegion.getRegionHeight());
        dstTexture.draw(miniObject,dstX,dstY);
    }
}

当我在桌面或三星 N-GT8000 上启动项目时,一切正常(绘图)。如果我在 GT-N5100 上启动它,则不会在dstTexture. dstTexture 的高度=800 宽度=600。

你能帮我解决这个问题吗?

4

1 回答 1

0

问题出在“miniObject=new PixMap(4,4,Pixmap.Format.RGB888);” 我的 dstTexture 具有 RGBA8888 格式,但是当我将其更改为 RBA8888 时 PixMap RGB888 一切正常。

于 2014-03-26T07:03:25.190 回答