FileDocCategorySizeDatePackage
GL2JNIView.javaAPI DocAndroid 5.1 API11762Thu Mar 12 22:22:48 GMT 2015com.android.gl2jni

GL2JNIView

public class GL2JNIView extends android.opengl.GLSurfaceView
An implementation of SurfaceView that uses the dedicated surface for displaying an OpenGL animation. This allows the animation to run in a separate thread, without requiring that it be driven by the update mechanism of the view hierarchy. The application-specific rendering code is delegated to a GLView.Renderer instance.

Fields Summary
private static String
TAG
Constructors Summary
public GL2JNIView(android.content.Context context)


       
        super(context);
        init(false, 0, 0);
    
public GL2JNIView(android.content.Context context, boolean translucent, int depth, int stencil)

        super(context);
        init(translucent, depth, stencil);
    
Methods Summary
private static voidcheckEglError(java.lang.String prompt, javax.microedition.khronos.egl.EGL10 egl)

        int error;
        while ((error = egl.eglGetError()) != EGL10.EGL_SUCCESS) {
            Log.e(TAG, String.format("%s: EGL error: 0x%x", prompt, error));
        }
    
private voidinit(boolean translucent, int depth, int stencil)

        setEGLContextFactory(new ContextFactory());
        setEGLConfigChooser( translucent ?
              new ConfigChooser(8,8,8,8, depth, stencil) :
              new ConfigChooser(5,6,5,0, depth, stencil));
        setRenderer(new Renderer());