Triangle, SpriteText and Downloader - Android Community Forums
Register Members List Social Groups Calendar Search Today's Posts Mark Forums Read


Go Back   Android Community Forums > Android Discussions > Android Apps Discussions > Android Apps Updates and Support


Android Apps Updates and Support Discuss 3rd-party Android apps - support and related updates (Developers can post releases here).

Reply
 
Thread Tools Display Modes
  #1  
Old 09-11-2008, 01:24 PM
refused9150 refused9150 is offline
refused9150 is kicking ass and taking names
Banned
 
Join Date: Aug 2008
Location: Tempe, AZ
Posts: 1,351
Blog Entries: 2
refused9150 has a reputation beyond reputerefused9150 has a reputation beyond reputerefused9150 has a reputation beyond reputerefused9150 has a reputation beyond reputerefused9150 has a reputation beyond reputerefused9150 has a reputation beyond reputerefused9150 has a reputation beyond reputerefused9150 has a reputation beyond reputerefused9150 has a reputation beyond reputerefused9150 has a reputation beyond reputerefused9150 has a reputation beyond repute
Default Triangle, SpriteText and Downloader

The first two samples, Triangle and SpriteText, show techniques that would be useful to anyone using the OpenGL ES 3D graphics APIs to write Android applications. The samples contain several reusable classes that may eventually be incorporated (in some form) into the SDK. Chief among these is the GLView class, which abstracts the OpenGL ES book-keeping code from the rest of the application. GLView helps handle the extra work OpenGL ES applications have to do when the activity is paused and resumed, and when the display goes to sleep and wakes up. In the Pause/Resume case the OpenGL surface has to be recreated. In the display sleep / wake-up case the entire OpenGL context has to be recreated.

Triangle
The first sample, Triangle, shows how to use the GLView class and the OpenGL ES 3D library to display a spinning textured triangle. Think of it as the "hello, world" of OpenGL ES apps. Because it's relatively simple, it's a good place to start when experimenting with the OpenGL ES API.

SpriteText
The second sample, SpriteText, shows how to efficiently display screen-aligned text using the GL11Ext.glDrawTexiOES method. SpriteText contains a reusable LabelMaker class for drawing static text and screen-aligned images, as well as a Projector class for finding the 2D screen coordinates corresponding to a 3D point, and a MatrixTrackingGL class for keeping track of the current transformation matrix. Finally, it shows how to use these classes to display a milliseconds per frame counter. A ms/f counter can be helpful for tuning graphics performance.

Downloader
The third sample, Downloader, shows how to add a downloader activity to your application. The downloader activity runs at the beginning of your application and makes sure that a set of files have been downloaded from a web server to the phone's SD card. Downloader is useful for applications that need more local data than can fit into an .apk file. For example a game could use Downloader to download the game's artwork, sound effects, and level data. The Downloader activity is designed to be a drop-in addition to your application. You customize it by supplying the URL of an XML configuration file which lists the data files that need to be downloaded.




[Via] Android Developers Blog
Reply With Quote
Ads
  #2  
Old 09-14-2008, 02:15 PM
georg georg is offline
georg has no status.
Smoke signaler
 
Join Date: Sep 2008
Posts: 2
georg is on a distinguished road
Default Re: Triangle, SpriteText and Downloader

Is the source from the svn of apps-for-android runnable? I have tried out the Triangle app but it doesn't run. I get only an "The application ... has stopped unexpectedly. ..." message.
Reply With Quote
Reply

Bookmarks


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump

Ads


All times are GMT -5. The time now is 08:46 AM.



Copyright © 2008-2009 Android Community / R3 Media LLC, All Rights Reserved.