Android UIandOpenGLThreading

Android UIandOpenGLThreading



Language :
Platform :




Go :

Android app to try Handler between UI and OpenGL threads.

Project Download Contributors

UIandOpenGLthreading

Changes: adding interesting UI bits to feed into a Handler implementation.

Current status: complete and published as Alpha-test app to Play store

Why bother? This is a sandbox example app with Handler methods to play with communications between the UI thread and the OpenGL thread

Play store - downloadable test app - try it here:

URL: https://play.google.com/store/apps/details?id=com.jimandreas.handlerstudy.uithread&hl=en

Other: This app also incorporates experiments in:

  • Constraint layout
  • ButterKnife
  • SeekBar features
  • Fling (mouse motion - Geeks mostly fling Flying Discs normally)

Build with: Android Studio 2.2.2

See also:

Threading Performance 101. (Android Performance Patterns Season 5)
http://www.youtube.com/watch?v=qk5F6Bxqhr4&list=PLWz5rJ2EKKc9CBxr3BVjPTPoDPLdPIFCE

Gif movie

Demonstrates what this app has implemented. Note that the sampling frequency is low enough so that the spin looks jerky - this is Nyquist in action. Try the app for the real look.

Note: gif movie made with the following tool: http://image.online-convert.com/convert-to-gif

Acknowledgements

"HelloOpenGLES20" sample app, as located inside the OpenGLES.zip file: https://developer.android.com/training/graphics/opengl/index.html
This app forms the base GL operation - and the UI components were added to form the sandbox app by myself.

Speedometer custom view, courtesy of: http://github.com/ntoskrnl/AndroidWidgets
compile 'com.cardiomood.android:android-widgets:0.1.1'

Android: Understanding OnDrawFrame, FPS and VSync (OpenGL ES 2.0)
http://stackoverflow.com/questions/38512936/android-understanding-ondrawframe-fps-and-vsync-opengl-es-2-0

Notes

What is with the wierd leading "0" in the name? My Nexus 4 does NOT allow sorting apps by installation order, so new installs are mixed in with all the other apps. In self-defense I prepend a digit so that the test app appears first in the order. You do what you gotta to in order to stay on the lee side of insanity.

Release builds

For a release build, you need to add a signing.properties file to the gradle folder. See this guide: http://gist.github.com/gabrielemariotti/6856974



    Leave a Reply

    Your email address will not be published. Required fields are marked *

    nineteen − eight =

    COMMENTS