GameLoop checking for input (Android/GlSurfaceView) -


if have basic game loop in thread, this:

public void run(){     getinput(); //ontouchevent method available in view class.     updatestate();     renderscreen();      } 

i wondering how check input (touchscreen ie). know can use ontouchevent() in view class, want check game loop. how done ?

ps: i'm using android glsurfaceview.

usually copy input events in ui thread , make them available game thread in threadsafe fashion.

you may use input implementation of libgdx example.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -