Share via


GLSurfaceView.IRenderer.OnDrawFrame(IGL10) Method

Definition

Called to draw the current frame.

[Android.Runtime.Register("onDrawFrame", "(Ljavax/microedition/khronos/opengles/GL10;)V", "GetOnDrawFrame_Ljavax_microedition_khronos_opengles_GL10_Handler:Android.Opengl.GLSurfaceView/IRendererInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void OnDrawFrame (Javax.Microedition.Khronos.Opengles.IGL10? gl);
[<Android.Runtime.Register("onDrawFrame", "(Ljavax/microedition/khronos/opengles/GL10;)V", "GetOnDrawFrame_Ljavax_microedition_khronos_opengles_GL10_Handler:Android.Opengl.GLSurfaceView/IRendererInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member OnDrawFrame : Javax.Microedition.Khronos.Opengles.IGL10 -> unit

Parameters

gl
IGL10

the GL interface. Use instanceof to test if the interface supports GL11 or higher interfaces.

Attributes

Remarks

Called to draw the current frame.

This method is responsible for drawing the current frame.

The implementation of this method typically looks like this:

void onDrawFrame(GL10 gl) {
                gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);
                //... other gl calls to render the scene ...
            }

Java documentation for android.opengl.GLSurfaceView.Renderer.onDrawFrame(javax.microedition.khronos.opengles.GL10).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to