question

mrflexile avatar image
mrflexile asked

White textures

Hello again! I'm having one more trouble, this time connected with graphics. So here are the details. There are two asset packages in my game: for frontend textures and for common game textures. Both of them have light and usual versions. So when I take usual frontend and light common packages my game works correctly. When taking usual frontend and usual common packages and going through some gameplay and/or jumping few times out of the application (home button) textures from frontend (not from common) package transform into white boxes and a whole game starts lagging madly. I guess there is not enough video memory for storing all the textures. Because the well-working build takes 34 Mb (in "Installed applications" section) while wrong-working takes more than 38 Mb. Is my assumption correct? Where can I find specification for amount of video-memory or common build-size (I have read in FAQs that there is no limitation on build size)? I'm using HD 7'' device and my log shows nothing connected with my troubles. Thanks for any help.
fire tablet
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Anshul@Amazon avatar image
Anshul@Amazon answered
The Kindle Fire HD uses the OMAP 4460 Multimedia Applications Platform. The complete specification of Kindle Fire HD is available at https://developer.amazon.com/sdk/fire/specifications.html We do not have any further information on Video memory.
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

mrflexile avatar image
mrflexile answered
After tremendous investigation I came into an issue: textures transform into white boxes after turning on 8888 buffer format in my GLSurfaceView init() method: setEGLConfigChooser(8, 8, 8, 8, 0, 0); getHolder().setFormat(PixelFormat.RGBA_8888); but when my buffer is 565 I can load much more heavyweight textures. So is it really Kindle's video-system issue? My iPad works greatly with 8888 format and the same texture package, but it's video processor is lower. Kindle's OS memory management? Thanks for any tips.
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

mrflexile avatar image
mrflexile answered
One more thing: my game works fine with all loaded textures in 8888 for some time, white boxes do appear after a little gameplay. Does it mean, that video subsystem somehow manage loaded textures? So sick with this trouble...
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

mrflexile avatar image
mrflexile answered
It turned out that I have GL_OUT_OF_MEMORY warning after glDrawArrays(). Which most of all means too much textures where loaded and using at the moment. But what the joke is: it happens on my HD device all the time, though running simple Kindle Fire makes me no such a pain. Memory management has been changed?
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

mrflexile avatar image
mrflexile answered
So, my conclusion by now is to migrate from openGL ES 1.1 to 2.0. Somehow we managed to reduce resources, but performance issues still present. Does anyone know is it the rigth way? Don't want to loose time.
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Anshul@Amazon avatar image
Anshul@Amazon answered
The default heap size on Kindle Fire HD 7" is 48 MB. However if your App is developed using API 11 or higher, you can use largeheap="true" attribute inside your manifest's application tag, which will allow the application to use more heap if it is available. As per android documentation, enabling this also does not guarantee a fixed increase in available memory, because some devices are constrained by their total available memory. If you are using extra heap space by using largeheap="true" , your app will spend more time during garbage collection. Sometimes this will impact other apps are being kicked out of memory. In logcat, you can analyze your app behavior by looking at the number of GC calls and the paused time during garbage collection.
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

mildagenius avatar image
mildagenius answered
We have the same problem on Kindle Fire HD. Parametr largeheap in AndroidManifest didnt help. We found, that problematic draw was from big png texture (2048x1024 px). Other big textures were in pvrt compressed format and the were fine. So we split big png texture to smaller and it helps us.
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sachin@Amazon avatar image
Sachin@Amazon answered
Hi mildagenius, Thank you for your post. This will surely help other developers as well.
10 |5000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.