I am having trouble understanding how threads, activities and
renderers fit together.

My current program structure is this:

- main activity, nothing in it really, just initialising things.

        mGLView = new GLSurfaceView(this);
        mGLView.setEGLConfigChooser(false);
        mGLView.setRenderer(new MyRenderer(this));

- renderer, which also contains some gameplay classes (e.g. MyShip)
and includes the input event handlers.

        public class MyRenderer implements GLSurfaceView.Renderer {

- map, which contains the vertex, texture etc and includes draw()
function. which is called from the onDrawFrame of MyRenderer.

At this stage I want to move all the input stuff into its own thread
(AFAIK this is most efficient?), I am not sure where this should be
initialised and how the input information should be sent to the
renderer.

I found this article 'Writing Real Time Games for Android' (
http://www.scribd.com/doc/16917369/Writing-Real-Time-Games-for-Android
) which outlines a program structure, which I think is what I am
looking for.

Here a diagram of the structure: http://imgur.com/WqZua.jpg

Can you describe how this is supposed to work (how it is all
initialised, how the program flows etc.)

TIA

Ed


-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to