opengl on android · i better performance than opengl es 1.x in many cases i android 2.2 and higher...
TRANSCRIPT
OpenGL on AndroidLecture 8
Android Native Development Kit
8 April 2014
NDK OpenGL on Android, Lecture 8 1/16
OpenGL ES
OpenGL ES on Android
Demo
Debugging and Profiling
NDK OpenGL on Android, Lecture 8 2/16
Outline
OpenGL ES
OpenGL ES on Android
Demo
Debugging and Profiling
NDK OpenGL on Android, Lecture 8 3/16
OpenGL ES
I Cut down version of OpenGL
I Fixed point support
I Found in many mobile platforms (Android, iOS, Blackberry,Symbian, 3DS, etc.)
I Designed for slower GPUs and CPUs
NDK OpenGL on Android, Lecture 8 4/16
Version 1.x
I OpenGL ES 1.0 based on OpenGL 1.3 and OpenGL ES 1.1based on OpenGL 1.5
I Common and Common-Lite (only fixed point) profile
I Fixed-function rendering pipeline
I Reduced features: no quad and polygon primitives, nostippling, only multisample AA, reduced drawing modes, nodisplay lists, etc.
I OpenGL ES 1.1 adds better multitexture support, VBOs, clipplanes, mipmap generation
I Android 1.0 and higher
NDK OpenGL on Android, Lecture 8 5/16
Version 2.0
I Based on OpenGL 2.0, but reduced fixed-function pipelinesupport
I Not compatible with OpenGL ES 1.x
I OpenGL ES Shading Language
I ESSL only has forward branches and fixed iteration loops
I Transforming and Lighting functions replaced by shaders
I Better performance than OpenGL ES 1.x in many cases
I Android 2.2 and higher
NDK OpenGL on Android, Lecture 8 6/16
Version 3.0
I Compatible with OpenGL ES 2.0 and OpenGL 4.3
I Standardized texture compression
I Better texturing support
I New Shading Language version with full support for integerand floating point
I Improved flow control
I Easier portability
I Android 4.3 and higher
NDK OpenGL on Android, Lecture 8 7/16
Outline
OpenGL ES
OpenGL ES on Android
Demo
Debugging and Profiling
NDK OpenGL on Android, Lecture 8 8/16
GL Surface
I Manages a surface (a piece of memory which can be displayedon screen)
I Manages an EGL display (an OpenGL rendering context)
I Dedicated rendering thread
I Can provide debug information
NDK OpenGL on Android, Lecture 8 9/16
EGL
I Virtual display which contains a rendering context
I 2D and 3D rendering
I Allows having multiple smaller surfaces on the actual screen ordrawing to offscreen buffer
I Used by SurfaceFlinger and other compositors (Wayland, Mir)or libraries (SDL)
NDK OpenGL on Android, Lecture 8 10/16
Outline
OpenGL ES
OpenGL ES on Android
Demo
Debugging and Profiling
NDK OpenGL on Android, Lecture 8 11/16
Demo
Demo
NDK OpenGL on Android, Lecture 8 12/16
Outline
OpenGL ES
OpenGL ES on Android
Demo
Debugging and Profiling
NDK OpenGL on Android, Lecture 8 13/16
Android tools
I Logging
I Debugging Developer Options: Overdraw, Clipping
I Profiling Developer Options: Performance metrics on screenor through ADB, Traces
I Tracer for OpenGL ES: Visualize traces
NDK OpenGL on Android, Lecture 8 14/16
Intel GPA
I Intel Atom processors
I More information: GPU, CPU, Battery usage
I More detailed analysis
I Identifies possible bottlenecks
I Realtime
I Works over Wifi
NDK OpenGL on Android, Lecture 8 15/16
Vendor specific tools
I Low level information
I Different interface and capabilities for each vendor
I Optimizations not always portable
I PowerVR, Tegra, Adreno, etc
NDK OpenGL on Android, Lecture 8 16/16