Condividi tramite


GLSurfaceView.RenderMode Property

Definition

Get the current rendering mode. -or- Set the rendering mode.

public virtual Android.Opengl.Rendermode RenderMode { [Android.Runtime.Register("getRenderMode", "()I", "GetGetRenderModeHandler")] get; [Android.Runtime.Register("setRenderMode", "(I)V", "GetSetRenderMode_IHandler")] set; }
[<get: Android.Runtime.Register("getRenderMode", "()I", "GetGetRenderModeHandler")>]
[<set: Android.Runtime.Register("setRenderMode", "(I)V", "GetSetRenderMode_IHandler")>]
member this.RenderMode : Android.Opengl.Rendermode with get, set

Property Value

the current rendering mode.

Attributes

Remarks

Property getter documentation:

Get the current rendering mode. May be called from any thread. Must not be called before a renderer has been set.

Java documentation for android.opengl.GLSurfaceView.getRenderMode().

Property setter documentation:

Set the rendering mode. When renderMode is RENDERMODE_CONTINUOUSLY, the renderer is called repeatedly to re-render the scene. When renderMode is RENDERMODE_WHEN_DIRTY, the renderer only rendered when the surface is created, or when #requestRender is called. Defaults to RENDERMODE_CONTINUOUSLY.

Using RENDERMODE_WHEN_DIRTY can improve battery life and overall system performance by allowing the GPU and CPU to idle when the view does not need to be updated.

This method can only be called after #setRenderer(Renderer)

Java documentation for android.opengl.GLSurfaceView.setRenderMode(int).

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

See also