If you are using the built in view subclass for OpenGL called GLSurfaceView, like those API demos do, then GLSurfaceView starts a separate thread that calls the renderer for you: http://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=opengl/java/android/opengl/GLSurfaceView.java;h=9ca57bae7a1fe1d6ec818169d2fcc205276ea0e0;hb=9db3d07b9620b4269ab33f78604a36327e536ce1#l285
There's some mention of this in the docs for those classes as well: http://developer.android.com/intl/zh-CN/reference/android/opengl/GLSurfaceView.html http://developer.android.com/intl/zh-CN/reference/android/opengl/GLSurfaceView.Renderer.html There was a time when GLSurfaceView wasn't yet included in Android and was just a class in the API demos. So the part of the docs you are quoting could be from back then or could be explaining how to do things if you didn't want to use GLSurfaceView. On Nov 21, 6:15 am, maximus-dev <sylus.mcf...@gmail.com> wrote: > Hello Everyone! > > The more I study the examples in the ApiDemo folder, the more I'm > beginning to understand how everything is meant to work. I do need > some minor clarification on something. In the docs there is this quick > snippet: > > "Here's how to use the API at an extremely high level: > > 1. Write a custom View subclass. > 2. Obtain a handle to an OpenGLContext, which provides access to > the OpenGL functionality. > 3. In your View's onDraw() method, get a handle to a GL object, and > use its methods to perform GL operations. > > For an example of this usage model (based on the classic GL > ColorCube), showing how to use it with threads can be found in > com.android.samples.graphics.GLSurfaceViewActivity.java." > > I'm not following how this creates a thread. Reading over thread > creation, there's both a Handle and Thread object created... with is > not done here. My apologies if this is a bit of an ignorant question, > but I'm just as new to Java as I am to Android. (I'm intermediate with > C and have used OpenGL). > > The TriangleActivity.java with the StaticTriangleRenderer.java is a > great example to learn from, but I'm still not sure how this makes use > of a thread. Or perhaps... is the thread creation handled somehow in > the renderer that I'm not following? > > Thanks everyone, -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en