Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Home
Help
Search
Login
Register
www.jpct.net
»
jPCT-AE - a 3d engine for Android
»
Support
»
Android background FrameBuffer, can't use 2^x height/widht
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: Android background FrameBuffer, can't use 2^x height/widht (Read 2050 times)
qw1nz
byte
Posts: 3
Android background FrameBuffer, can't use 2^x height/widht
«
on:
March 12, 2014, 11:25:37 am »
Hello, For my app I can't use 2^x height/widht, because android devices have many different resolution, I need that image fills my display.
For example: my device has resolution 720x1280, I need set background image 720x1280.
How can I do it?
Logged
EgonOlsen
Administrator
quad
Posts: 12297
Re: Android background FrameBuffer, can't use 2^x height/widht
«
Reply #1 on:
March 12, 2014, 11:29:18 am »
Personally, i would scale it anyway. You can't support any possible resolution out there with a special version of your background image. However, if you still want to, have a look at the NPOTTexture class.
Logged
qw1nz
byte
Posts: 3
Re: Android background FrameBuffer, can't use 2^x height/widht
«
Reply #2 on:
March 12, 2014, 12:01:13 pm »
I can scale, but if I have resolution 1080x??? - fullhd display, then I need upload 2048x2048 image. but it give me outofmemoryerror
Logged
EgonOlsen
Administrator
quad
Posts: 12297
Re: Android background FrameBuffer, can't use 2^x height/widht
«
Reply #3 on:
March 12, 2014, 02:23:59 pm »
You can always upscale. A 2048*2048 texture uses a LOT of memory and is usually too large for almost any device.
Logged
qw1nz
byte
Posts: 3
Re: Android background FrameBuffer, can't use 2^x height/widht
«
Reply #4 on:
March 13, 2014, 03:48:20 am »
Can I use alpha/invisible framebuffer background or world background that I can see any views behind GLSurfaceView?
If Yes, How can I do it?
Logged
EgonOlsen
Administrator
quad
Posts: 12297
Re: Android background FrameBuffer, can't use 2^x height/widht
«
Reply #5 on:
March 13, 2014, 10:08:57 am »
Yes, you can. You just have to setup the gl context in a different way and clear the framebuffer with some alpha value. You might have to blit your background with transparency in addition. Search the forum, you should be able to find some hints that show you how you modify your setup code. People usually do this to put the camera image into the background.
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
www.jpct.net
»
jPCT-AE - a 3d engine for Android
»
Support
»
Android background FrameBuffer, can't use 2^x height/widht