www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: Uncle Ray on October 08, 2014, 05:08:17 am

Title: why set texture with 128*128 png is ok,but 128*256 it is none?
Post by: Uncle Ray on October 08, 2014, 05:08:17 am
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.....?
Title: Re: why set texture with 128*128 png is ok,but 128*256 it is none?
Post by: EgonOlsen on October 08, 2014, 08:08:31 am
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.
Title: Re: why set texture with 128*128 png is ok,but 128*256 it is none?
Post by: Uncle Ray on October 08, 2014, 08:20:44 am
yes,it is opengl es 2.0,i got it,just square,thx ego.