{"action":"created","issue":{"url":"https://api.github.com/repos/libgdx/libgdx/issues/3044","labels_url":"https://api.github.com/repos/libgdx/libgdx/issues/3044/labels{/name}","comments_url":"https://api.github.com/repos/libgdx/libgdx/issues/3044/comments","events_url":"https://api.github.com/repos/libgdx/libgdx/issues/3044/events","html_url":"https://github.com/libgdx/libgdx/issues/3044","id":70391372,"number":3044,"title":"Strange issue with Assetloader & TextureAtlas","user":{"login":"voidstarfire","id":6940726,"avatar_url":"https://avatars.githubusercontent.com/u/6940726?v=3","gravatar_id":"","url":"https://api.github.com/users/voidstarfire","html_url":"https://github.com/voidstarfire","followers_url":"https://api.github.com/users/voidstarfire/followers","following_url":"https://api.github.com/users/voidstarfire/following{/other_user}","gists_url":"https://api.github.com/users/voidstarfire/gists{/gist_id}","starred_url":"https://api.github.com/users/voidstarfire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/voidstarfire/subscriptions","organizations_url":"https://api.github.com/users/voidstarfire/orgs","repos_url":"https://api.github.com/users/voidstarfire/repos","events_url":"https://api.github.com/users/voidstarfire/events{/privacy}","received_events_url":"https://api.github.com/users/voidstarfire/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2015-04-23T11:42:38Z","updated_at":"2015-05-19T08:10:39Z","closed_at":null,"body":"I've noticed that some of my graphics/textures are black squares when I compile my app for iOS (Device & Simulator). Now I was thinking this is probably something todo with Power of Two on iOS? (some POT graphics work, other's don't)\r\n\r\nFor example, I have two circle textures as a test, one is 300x300 and one is 256x256.\r\nI draw both of them the same size, but only the 300x300 works AND it's on the same TextureAtlas PNG..\r\n\r\nIt works on every Android device I can test on.\r\n\r\nMy Atlas packer settings are: (it does not allow PoT for individual textures on atlas)\r\n```\r\nTexturePacker.Settings tSettings = new TexturePacker.Settings();\r\n        tpSettings.maxWidth = 2048;\r\n        tpSettings.maxHeight = 2048;\r\n        tpSettings.filterMag = Texture.TextureFilter.MipMapLinearNearest;\r\n        tpSettings.filterMin = Texture.TextureFilter.Nearest;\r\n        tpSettings.pot = true; //(for whole atlas)\r\n        TexturePacker.process(tpSettings, args[0], args[1], args[2]);\r\n```\r\n\r\nWhen loading the asset with AssetManager\r\nNote there is no option to set and params here. The TextureAtlasParam only contains one param = flip.\r\n```\r\nthis.assetManager.load(DEFAULT_PACK, TextureAtlas.class);\r\n```\r\n\r\nI store my texture atlases like so (for static string retrieval)\r\n```\r\n//Get atlases\r\n            TextureAtlas defaultAtlas = this.assetManager.get(SpriteLoader.DEFAULT_PACK, TextureAtlas.class);\r\n\r\n            //Load in regions\r\n\r\n            //Default regions (stored in an array.)\r\n            atlasRegionObjectMap.put(DEFAULT_WHITE_CIRCLE, defaultAtlas.findRegion(DEFAULT_WHITE_CIRCLE));\r\n```\r\n\r\nAfter they are loaded and stored, I get them like this:\r\nAfter they are loaded i retrieve sprites like so:\r\n\r\n```\r\n    public Sprite getSprite(String textureName)\r\n    {\r\n        return new Sprite(this.atlasRegionObjectMap.get(textureName));\r\n    }\r\n```\r\n\r\nI render a sprite as such:\r\nUpdate first:\r\n```\r\nthis.sprite.setBounds(\r\n                    getLeft() + (this.paddingX / 2f), //Left X\r\n                    getBottom() + (this.paddingY / 2f), //Bottom Y\r\n                    getWidth() - this.paddingX, //Right Width\r\n                    getHeight() - this.paddingY //Top Height\r\n            );\r\n            this.sprite.setRotation(this.rotationDegree);\r\n            this.sprite.setOriginCenter();\r\n```\r\nThe Render:\r\n```\r\nif(!this.isInvisible && getAlpha() > ValueStorage.FLOAT_EPSILON && isOnScreen()){\r\n            //Draw the sprite.\r\n            this.sprite.setColor(getRGBA()[RED], getRGBA()[GREEN], getRGBA()[BLUE], getRGBA()[ALPHA]);\r\n            this.sprite.draw(spriteBatch);\r\n        }\r\n```\r\n\r\nI have tried with various different texture filters with no effect.\r\n\r\nAny ideas?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/libgdx/libgdx/issues/comments/103391628","html_url":"https://github.com/libgdx/libgdx/issues/3044#issuecomment-103391628","issue_url":"https://api.github.com/repos/libgdx/libgdx/issues/3044","id":103391628,"user":{"login":"badlogic","id":514052,"avatar_url":"https://avatars.githubusercontent.com/u/514052?v=3","gravatar_id":"","url":"https://api.github.com/users/badlogic","html_url":"https://github.com/badlogic","followers_url":"https://api.github.com/users/badlogic/followers","following_url":"https://api.github.com/users/badlogic/following{/other_user}","gists_url":"https://api.github.com/users/badlogic/gists{/gist_id}","starred_url":"https://api.github.com/users/badlogic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/badlogic/subscriptions","organizations_url":"https://api.github.com/users/badlogic/orgs","repos_url":"https://api.github.com/users/badlogic/repos","events_url":"https://api.github.com/users/badlogic/events{/privacy}","received_events_url":"https://api.github.com/users/badlogic/received_events","type":"User","site_admin":false},"created_at":"2015-05-19T08:10:39Z","updated_at":"2015-05-19T08:10:39Z","body":"An iOS app does indeed package a default.atlas file, which is not a libGDX\ntexture atlas. The easiest fix is to rename your own atlas file. The iOS\nresources (launch screens, icons, etc.) And you games resources are likely\nmerged when the final app is packaged.\nOn May 19, 2015 10:03 AM, \"Tomski\" <notifications@github.com> wrote:\n\n> They aren't loaded into any AssetManager unless you do it yourself.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/libgdx/libgdx/issues/3044#issuecomment-103389986>.\n>\n"}}