jPCT-AE - a 3d engine for Android > Support

blitting text and images

(1/9) > >>

raft:
here are Android versions of two small and (hopefully) handy classes for blitting text and images. more information can be found on original thread

TexturePack packs several arbitrary sized images into a jPCT texture. it automatically layouts images and adjusts Texture size.

AGLFont creates GL renderable (blittable) fonts out of Android fonts.

Rectangle is used by AGLFont.

Bones Android demo app demonstrates how to use it

and an addition to GLFont by nmare which allows multi-line and multi-color text blits

cheers ;D
r a f t

edit: updated the links and fixed getStringBounds(..) issue
edit2: added link to nmare's addition

EgonOlsen:
An apk would be cool in addition...

raft:

--- Quote from: EgonOlsen on March 30, 2010, 08:18:12 pm ---An apk would be cool in addition...
--- End quote ---

already there is an apk indeed. it's listed in Bones home page

EgonOlsen:
I see...works fine (30fps without/8fps with animation) and looks great on my phone. I would be very interested to know how this runs on the Nexus One... dl.zerocool to the rescue?

raft:
i've already asked him for a test ;) hoping he wont mind quoting from pm:


--- Quote ---Here is some basic results. Apparently everything runs pretty fine.
while not animating fps are arround 55 to 59

When the animation starts you drop down to 15fps to 20fps~ depending on which animation you choose, then after a second it goes back to 30fps even "spin" animation who look like a little bit slower that the other (sometimes it fall back from 30 to 26 fps)

What is strange is that all animation get stuck to 30fps after a second, like there's something synchronizing behind.
I didn't had time to look at your code, so at moment I'm just running the apk demo.

--- End quote ---

slow down while animating is expected. but i cant explain it gain some speed again. it behaves like it has JIT but it hasnt AFAIK. maybe Android detects continuous data flow and make some optimization ???

Navigation

[0] Message Index

[#] Next page

Go to full version