why set texture with 128*128 png is ok,but 128*256 it is none?

Started by Uncle Ray, October 08, 2014, 05:08:17 AM

Previous topic - Next topic

Uncle Ray

SOLVED THX EGO
with the Objetc3D ,i used the same png for set texture,when it's resolution 128*128,everything is ok.
but when it's resolution is 128*256,the object3D was displayed nothing but black.

whether the texture must be 128*128,256*256.....?

EgonOlsen

OpenGL ES 2.0? In that case, it's "normal" behaviour. That's why the log should output a warning message if you are using such a texture. IIRC, this is caused by a loophole in the ES 2.0 specs, which somehow doesn't define the expected result for such textures, so the GPU vendor is free to handle this case in every way he likes and that includes black squares. The result when using such textures in not predictable. Sometimes it works, sometimes it doesn't. Judging from my experience, it seems to work for 256*128 more than it does for 128*256. But to be sure, just use square textures instead.

Uncle Ray