Matthias Elephant Posted November 28, 2016 Share Posted November 28, 2016 Hi all, i tested the new Phaser CE Version (2.7.0) with the Multi Texture Batching (http://phaser.io/tutorials/advanced-rendering-tutorial/part3). Quote var config = { width: 800, height: 600, renderer: Phaser.AUTO, antialias: true, multiTexture: true}; var game = new Phaser.Game(config); After some tests on PC (Chrome, FF) i build my app (cocoon) and tried it on some android devices. On one of my test devices (Samsung Galaxy Nexus I9250) i just got a black screen (only if "multiTexture: true"). Without multiTexture, WebGL works without any problems. On Phone (Browser): Crap! WebGL was blocked. Remote Debugger output: What you think about? Greetings Link to comment Share on other sites More sharing options...
nazimboudeffa Posted November 28, 2016 Share Posted November 28, 2016 Hi Matthias i would like to help in this issue with a game but i really don't have much to say then what is in attachement, because i don't know how to load the atlas cards of it if you can help me too so we can go further in the solution Hackers Card Game.zip Link to comment Share on other sites More sharing options...
rich Posted November 28, 2016 Share Posted November 28, 2016 Hi, Sorry but this isn't designed for use within Cocoon apps (which already do their own thing re: WebGL) As for in browser more details are needed - did you get a chance to try it with just a simple app for example? (something that just loads an image and makes a Sprite) - does that fail too, or is it only when put into your game? (trying to determine if it's a browser + device issue across the board, or an implementation) nazimboudeffa 1 Link to comment Share on other sites More sharing options...
Matthias Elephant Posted November 28, 2016 Author Share Posted November 28, 2016 Hi, attached you will find a simple example. That is the result, when i open it on chrome (54.0.2840.85) on my android phone. Output is from remote debugging. I'm not sure what you mean with "not designed for use within Cocoon apps". What is the background about this? I think we can get a pretty good performance with the multi texture batching also on mobile. At mentioned i testet several devices. Just problems with this one. Other devies works well with it. test.zip nazimboudeffa 1 Link to comment Share on other sites More sharing options...
rich Posted December 5, 2016 Share Posted December 5, 2016 Assuming the error in the screen shot is accurate, and not Chrome being misleading, then it tells the tale: The combined size of the textures you're trying to use in parallel are too large for the memory available on that GPU. So while it can support that many multiple textures (which is good), you've run the GPU out of memory in the process. Link to comment Share on other sites More sharing options...
Matthias Elephant Posted December 5, 2016 Author Share Posted December 5, 2016 Hi @rich, thank you for your response. I read about the MTB in the tutorial. There is the following statement about the texture units. If your the array you pass to the method has 12 elements in it, but the GPU only supports 8 texture units, then Phaser will just bind the first 7, and ignore the rest. On more powerful devices, if the GPU supports 16 textures, it will bind them all, and your entire scene will render in one single draw call. Phaser reserves 1 texture as a 'swap texture', the rest are entirely free for use though.Now i understand that the number of texture units is not related to the memory of the GPU. Is that correct? So how to be sure, that my texture are not to big for the GPU? I use the same textures in Phaser 2.6.2 with WebGl (in cocoon) and it works fine. Texture are build with texturepacker (po2 - max 2048x2048) I switched the Phaser version again (same textures) to 2.7.1 but without MTB usage and i got the same errors. So it seems to be no problem related with MTB. Link to comment Share on other sites More sharing options...
Fatalist Posted December 5, 2016 Share Posted December 5, 2016 On 11/29/2016 at 1:59 AM, Matthias Elephant said: test.zip You get the same error with that project? That's a very small texture... Link to comment Share on other sites More sharing options...
Matthias Elephant Posted December 5, 2016 Author Share Posted December 5, 2016 No i used my real project files. Not that test project. Link to comment Share on other sites More sharing options...
Recommended Posts