passing instructions from UI thread to Rendering thread (GLSurfaceView)
The Setup : A RelativeLayout with a GLSurfaceView and a Button as shown in the image.. The Problem: Lets say I have other triangle models (The one in the picture being the initial model)... I wish to change the models cyclically on click of the button. Since button is on the UI thread and glSurfaceView runs on a separate thread, I don't exactly know how to pass the info/instruction to it. I know there is this thing called Handler in Android which might be useful in this case... But I need some help here.. Edit: If Handler is the right way, I need to know how to add Looper to that Handler...