www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: kkl on October 24, 2013, 02:12:34 pm

Title: Mipmap black texture
Post by: kkl on October 24, 2013, 02:12:34 pm
Hi Egon,

I turned mipmap on for 256x128 texture and it turned out a black texture. If mipmap is disabled, the texture is fine. Mipmap also works fine  on 512x512 texture. Any idea what happened exactly?
Title: Re: Mipmap black texture
Post by: EgonOlsen on October 24, 2013, 03:32:28 pm
Some drivers do this for non-square textures, which is why jPCT usually prints out a warning in this case. You can try to set Config.internalMipmapCreation=true to see if it helps to bypass the GPU for this, but the best solution would be to use square textures.
Title: Re: Mipmap black texture
Post by: kkl on October 24, 2013, 04:09:57 pm
It's still the same when Config.internalMipmapCreation=true. I guess I have to squeeze everything into one square image.
Title: Re: Mipmap black texture
Post by: Irony on October 25, 2013, 10:20:27 am
Can this also happen when I use a texture just for blitting? I have a few GUI elements which are everything but square.
Title: Re: Mipmap black texture
Post by: EgonOlsen on October 25, 2013, 10:53:45 am
If the problem is caused by mipmap usage, then it should not happen when blitting, because blitted textures don't access the mipmaps (unless you are blitting them smaller than they actually are).