stupot Posted March 7, 2017 Share Posted March 7, 2017 Just upgraded to 2.7.3 and thought I'd try out multi-texture. It appeared to work (less draw calls) but I noticed the following: The setTexturePriority() accepts an array of keys and checks only the image cache for matches. I wanted to include some rendertarget and text textures. I was able to manualy set the textureIndex property of those textures and the draw count dropped accordingly, so that appeared to work. Is there any reason why setTexturePriority() doesn't allow a wider variety of targets? The docs say to clear out the multi-texture settings by passing in an empty array to setTexturePriority(), which doesn't do anything. It wrongly references 'index' instead of 'i', to reset the texturePriority of the textureNameCollection[] list. A[art from this fault, I'm thinking that this should really be clearing every texturePriority to include any manualy set ones, not just the ones remembered from the last setTexturePriority() call. What's the thinking on this? Link to comment Share on other sites More sharing options...
samme Posted June 22, 2017 Share Posted June 22, 2017 On 3/7/2017 at 10:45 AM, stupot said: The docs say to clear out the multi-texture settings by passing in an empty array to setTexturePriority(), which doesn't do anything. This was fixed in https://github.com/photonstorm/phaser-ce/releases/tag/v2.8.1. Link to comment Share on other sites More sharing options...
stupot Posted June 26, 2017 Author Share Posted June 26, 2017 On 22/06/2017 at 5:24 PM, samme said: This was fixed in https://github.com/photonstorm/phaser-ce/releases/tag/v2.8.1. Thanks for the update samme. My local fixed setTexturePriority() allows non-image components to be specified, thus allowing a wider range of things with textures to be added. It's a few commits behind now but I could update it and check in? I got my whole game down to 1 draw (I think) and it ran slower, probably something to do with issue #198, so didn't pursue the mutitexture route any further. Link to comment Share on other sites More sharing options...
Recommended Posts