1*38e8c45fSAndroid Build Coastguard Worker------------------------------------------------------------------------ 2*38e8c45fSAndroid Build Coastguard WorkerSan Angeles Observation OpenGL ES version example 3*38e8c45fSAndroid Build Coastguard WorkerCopyright 2004-2005 Jetro Lauha 4*38e8c45fSAndroid Build Coastguard WorkerWeb: http://iki.fi/jetro/ 5*38e8c45fSAndroid Build Coastguard WorkerSee file license.txt for licensing information. 6*38e8c45fSAndroid Build Coastguard Worker------------------------------------------------------------------------ 7*38e8c45fSAndroid Build Coastguard Worker 8*38e8c45fSAndroid Build Coastguard WorkerThis is an OpenGL ES port of the small self-running demonstration 9*38e8c45fSAndroid Build Coastguard Workercalled "San Angeles Observation", which was first presented in the 10*38e8c45fSAndroid Build Coastguard WorkerAssembly'2004 event. It won the first place in the 4 KB intro 11*38e8c45fSAndroid Build Coastguard Workercompetition category. 12*38e8c45fSAndroid Build Coastguard Worker 13*38e8c45fSAndroid Build Coastguard WorkerThe demonstration features a sightseeing of a futuristic city 14*38e8c45fSAndroid Build Coastguard Workerhaving many different kind of buildings and items. Everything is 15*38e8c45fSAndroid Build Coastguard Workerflat shaded with three different lights. 16*38e8c45fSAndroid Build Coastguard Worker 17*38e8c45fSAndroid Build Coastguard WorkerThe original version was made for desktop with OpenGL. It was 18*38e8c45fSAndroid Build Coastguard Workernaturally heavily size optimized in order to fit it in the size 19*38e8c45fSAndroid Build Coastguard Workerlimit. For this OpenGL ES version example much of the code is 20*38e8c45fSAndroid Build Coastguard Workercleaned up and the sound is removed. Also detail level is lowered, 21*38e8c45fSAndroid Build Coastguard Workeralthough it still contains over 60000 faces. 22*38e8c45fSAndroid Build Coastguard Worker 23*38e8c45fSAndroid Build Coastguard WorkerThe Win32 (2000/XP) binary package of original version is 24*38e8c45fSAndroid Build Coastguard Workeravailable from this address: http://jet.ro/files/angeles.zip 25*38e8c45fSAndroid Build Coastguard Worker 26*38e8c45fSAndroid Build Coastguard WorkerFirst version of this OpenGL ES port was submitted to the Khronos 27*38e8c45fSAndroid Build Coastguard WorkerOpenGL ES Coding Challenge held in 2004-2005. 28*38e8c45fSAndroid Build Coastguard Worker 29*38e8c45fSAndroid Build Coastguard WorkerAs a code example, this source shows the following: 30*38e8c45fSAndroid Build Coastguard Worker * How to create a minimal and portable ad hoc framework 31*38e8c45fSAndroid Build Coastguard Worker for small testing/demonstration programs. This framework 32*38e8c45fSAndroid Build Coastguard Worker compiles for both desktop and PocketPC Win32 environment, 33*38e8c45fSAndroid Build Coastguard Worker and a separate source is included for Linux with X11. 34*38e8c45fSAndroid Build Coastguard Worker * How to dynamically find and use the OpenGL ES DLL or 35*38e8c45fSAndroid Build Coastguard Worker shared object, so that the library is not needed at 36*38e8c45fSAndroid Build Coastguard Worker the compile/link stage. 37*38e8c45fSAndroid Build Coastguard Worker * How to use the basic features of OpenGL ES 1.0/1.1 38*38e8c45fSAndroid Build Coastguard Worker Common Lite, such as vertex arrays, color arrays and 39*38e8c45fSAndroid Build Coastguard Worker lighting. 40*38e8c45fSAndroid Build Coastguard Worker * How to create a self contained small demonstration 41*38e8c45fSAndroid Build Coastguard Worker application with objects generated using procedural 42*38e8c45fSAndroid Build Coastguard Worker algorithms. 43*38e8c45fSAndroid Build Coastguard Worker 44*38e8c45fSAndroid Build Coastguard WorkerAs the original version was optimized for size instead of 45*38e8c45fSAndroid Build Coastguard Workerperformance, that holds true for this OpenGL ES version as 46*38e8c45fSAndroid Build Coastguard Workerwell. Thus the performance could be significantly increased, 47*38e8c45fSAndroid Build Coastguard Workerfor example by changing the code to use glDrawElements 48*38e8c45fSAndroid Build Coastguard Workerinstead of glDrawArrays. The code uses only OpenGL ES 1.0 49*38e8c45fSAndroid Build Coastguard WorkerCommon Lite -level function calls without any extensions. 50*38e8c45fSAndroid Build Coastguard Worker 51*38e8c45fSAndroid Build Coastguard WorkerThe reference OpenGL ES implementations used for this application: 52*38e8c45fSAndroid Build Coastguard Worker * Hybrid's OpenGL ES API Implementation (Gerbera) version 2.0.4 53*38e8c45fSAndroid Build Coastguard Worker Prebuilt Win32 PC executable: SanOGLES-Gerbera.exe 54*38e8c45fSAndroid Build Coastguard Worker * PowerVR MBX SDK, OpenGL ES Windows PC Emulation version 1.04.14.0170 55*38e8c45fSAndroid Build Coastguard Worker Prebuilt Win32 PC executable: SanOGLES-PVRSDK.exe 56*38e8c45fSAndroid Build Coastguard Worker 57*38e8c45fSAndroid Build Coastguard WorkerNote that DISABLE_IMPORTGL preprocessor macro can be used 58*38e8c45fSAndroid Build Coastguard Workerto specify not to use dynamic runtime binding of the library. 59*38e8c45fSAndroid Build Coastguard WorkerYou also need to define preprocessor macro PVRSDK to compile 60*38e8c45fSAndroid Build Coastguard Workerthe source with PowerVR OpenGL ES SDK. 61*38e8c45fSAndroid Build Coastguard Worker 62*38e8c45fSAndroid Build Coastguard WorkerThe demo application is briefly tested with a few other OpenGL ES 63*38e8c45fSAndroid Build Coastguard Workerimplementations as well (e.g. Vincent, GLESonGL on Linux, Dell 64*38e8c45fSAndroid Build Coastguard WorkerAxim X50v). Most of these other implementations rendered the demo 65*38e8c45fSAndroid Build Coastguard Workererroneously in some aspect. This may indicate that the demo source 66*38e8c45fSAndroid Build Coastguard Workercould still have some work to do with compatibility and correct 67*38e8c45fSAndroid Build Coastguard WorkerAPI usage, although the non-conforming implementations are most 68*38e8c45fSAndroid Build Coastguard Workerprobably unfinished as well. 69*38e8c45fSAndroid Build Coastguard Worker 70*38e8c45fSAndroid Build Coastguard WorkerThanks and Acknowledgements: 71*38e8c45fSAndroid Build Coastguard Worker 72*38e8c45fSAndroid Build Coastguard Worker* Toni L�nnberg (!Cube) created the music for original version, which 73*38e8c45fSAndroid Build Coastguard Worker is not featured in this OpenGL ES port. 74*38e8c45fSAndroid Build Coastguard Worker* Sara Kapli (st Rana) for additional camera work. 75*38e8c45fSAndroid Build Coastguard Worker* Paul Bourke for information about the supershapes. 76*38e8c45fSAndroid Build Coastguard Worker 77*38e8c45fSAndroid Build Coastguard Worker------------------------------------------------------------------------ 78