c# - What Determines Maximum Texture Size? -


i'm unity3d developer working on mobile games. ran issue of our textures being rendered black square. after research found out had devices support of maximum texture sizes. devices in question (iphone 4 , older android phones) supported maximum texture size of 2048 x 2048, while newer devices had maximum texture size support of 4096 x 4096. resolve problem unpacked our sprite map several smaller 2048 x 2048 texture maps.

two questions:

1) determines maximum supported texture size of particular device? graphics card, kind of hardware limitation? or supported version opengl es determines this?

2) there easy way pro-grammatically find out maximum texture size device is? if api or sdk using find information

1) it's determined device hardware, graphics chip (gpu).

2) yes. it's part of opengl property reported graphics card. try code snippet:

int size; glgetintegerv(gl_max_texture_size, &size); 

as long you're considering ios devices it's pretty easy: 4096x4096 textures supported iphone 4s , newer , ipad 2 , newer. older devices support 2048x2048.

ipad 2 special case, if installed ios version 5.0 or older able use 2048x2048.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -

django - CSRF verification failed. Request aborted. CSRF cookie not set -