barkingwhale Posted August 4, 2017 Share Posted August 4, 2017 In the performance tips section, https://github.com/pixijs/pixi.js/wiki/v4-Performance-Tips, it mentions " On older devices use smaller low res textures " How do you detect that in a mobile browser? Especially on iphone/ipad? The UA string identifies ipad/iphone but not the model numbers. I would love to use 1/2 size textures on iphone5, but don't want to cripple the experience on iphone7 etc. Thanks in advance. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted August 4, 2017 Share Posted August 4, 2017 var gl = renderer.gl; var maxTexSize= gl.getParameter(gl.MAX_TEXTURE_SIZE); Quote Link to comment Share on other sites More sharing options...
barkingwhale Posted August 4, 2017 Author Share Posted August 4, 2017 Thanks Ivan. Good idea, but my iphone 7 and iphone5c both return 4096. I've looked at other gl parameters and they are all the same across the devices. Any other ideas? Quote Link to comment Share on other sites More sharing options...
xerver Posted August 4, 2017 Share Posted August 4, 2017 That is the way to check the value, not sure I understand your question if this isn't what you want. Quote Link to comment Share on other sites More sharing options...
barkingwhale Posted August 7, 2017 Author Share Posted August 7, 2017 Yes, gl.getParameter(gl.MAX_TEXTURE_SIZE); is the correct way to get that value. But both iphone7 and iphone5c return 4096 for that parameter. What i am asking for is a way at load time, to detect if the device is a lower end iphone so then I can load half rez textures, but keep the full rez for higher end iphones. This needs to be done on a website through a browser, and so far I've stuck out on ways to detect it. Thanks. Quote Link to comment Share on other sites More sharing options...
themoonrat Posted August 7, 2017 Share Posted August 7, 2017 Take a look through https://webglstats.com for other webgl parameters you could use to distinguish device performance. I know that older hardware on mobile returns 0 for SAMPLES for example Taz and ivan.popelyshev 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.