I'm used to mainly working with the Canvas SurfaceView API on Android and have recently been learning openGL ES 2.0

With canvas I know that surfaceView gives you the ability to start a new thread to render on, but it doesn't specifically do this for you, so I was creating a new thread and managing that thread when the app was ended / paused etc....

However, from what I've read with glSurfaceView it seems that this is actually done for you automatically? Does this mean I don't actually need to manually create / start and manage my own rendering thread? (I'm talking specifically about a rendering thread (which could also be used for logic updates) which is separate the main UI thread.

Clarification on this matter would be greatly appreciated.


1 Answer 1


All rendering is done on a separate thread, and this is done for you automatically. The documentation is very explicit about this (quoted from http://developer.android.com/reference/android/opengl/GLSurfaceView.Renderer.html) :


The renderer will be called on a separate thread, so that rendering performance is decoupled from the UI thread. Clients typically need to communicate with the renderer from the UI thread, because that's where input events are received. Clients can communicate using any of the standard Java techniques for cross-thread communication, or they can use the queueEvent(Runnable) convenience method.

This means you do NOT have to create and manage a rendering thread yourself.

I hope this clarifies the matter :)


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .