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
Post a Comment