Hi,
I want one texture from textureatlas, but I get all. The atlas file is ok, it contains my images
I do this:
private Bitmap getBitmap(int resId){
Drawable d = mContext.getResources().getDrawable(resId);
Bitmap bmp = drawableToBitmap(d);
return bmp;
}// Create Atlas from Bitmaps
java.util.Map<Object, Bitmap> inputMap = new LinkedHashMap<>();
java.util.Map<Object, TextureRegion> regionsMap = new LinkedHashMap<>();
List<TextureAtlas> atlasList = new ArrayList<>();
inputMap.put("101", getBitmap(R.drawable.ic_traditional));
inputMap.put("102", getBitmap(R.drawable.ic_multi));
TextureAtlasUtils.createTextureRegions(inputMap, regionsMap, atlasList, true, false);
I want the "101" element:
TextureItem t = mRegionsMap.get("101").texture;
The result is the full atlas image not just the "101". It is ok?
What is the correct way to get texture from atlas?
Best regards,
Laszlo