www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: vael on August 21, 2010, 10:53:35 pm

Title: Background pic
Post by: vael on August 21, 2010, 10:53:35 pm
Hi all. I've got a problem trying to set a background pic
I tried to blit texture to framebuffer after calling clear()
and something definitely went wrong. in log I see that it resized (lowered) resolution when loaded the texture, but thats not the whole problem I guess. and I'd like resolution to stay high enough, like 800x480.
could you please tell me how I am supposed to do it?
Title: Re: Background pic
Post by: EgonOlsen on August 22, 2010, 10:31:24 am
A texture always have to have a size and width that's a power of 2. Everything else will be scaled down. If you really need a 1-to-1-blit of the source image (which will fit one resolution only anyway), you have to split it into several power of 2 texture. If that's not needed, i suggest to scale your background to 512*512 and blit that onto the 800*480 screen. That should look good enough in most cases.
Title: Re: Background pic
Post by: vael on August 22, 2010, 12:50:16 pm
that's right, thanks for explanation :)
Title: Re: Background pic
Post by: vael on August 22, 2010, 12:58:28 pm
oh and one more question please :)
is there in alternative to ReflectionHelper in Android version of jPCT?
Title: Re: Background pic
Post by: EgonOlsen on August 22, 2010, 05:12:36 pm
No, there isn't. Open GL 1.1 doesn't really support this and even if it would, it would be much too slow.