One bizarre option you might want to consider is pre-generating Java
files with arrays in them. It benchmarked faster than reading files in
via Java NIO when I tested it for my purposes. I'm only doing 2D,
though. I use a script that takes a bunch of individual graphics files
and puts them into a couple atlas textures, then pre-generates the
texture coordinates for the two triangles needed to draw each graphic.
So each pre-generated atlas texture has a pre-generated Java file with
an array of all the useful texture coordinate sets for it, and
constants for the offset into the array to use to get them for a
particular graphic.

On Sep 6, 7:33 pm, SChaser <[email protected]> wrote:
> My app has large vertex arrays that are pre-computed before I even
> build the app for distribution. I'd like to store these in assets
> (recognizing the size limits of asset files) and read them in with
> minimal computation.
>
> Can I store them in binary, and just read them into an NIO buffer, and
> then wrap it for GL, or do I have to go through the whole compute
> intensive (?) process of reading it in, making a byte array, and
> converting that to an integer (in this case) array?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to