Class GLView

Definition

Namespace:
Tizen.NUI.BaseComponents
Assembly:
Tizen.NUI.dll
API Level:
10

GLView allows drawing with OpenGL. GLView creates a context, a surface, and a render thread. The render thread invokes user's callbacks.

C#
Copy
public class GLView : View, INotifyPropertyChanged, IDynamicResourceHandler, IElement, INameScope, IElementController, IDisposable, IResourcesProvider
Inheritance
System.Object
Tizen.NUI.Binding.Element
GLView
Implements
System.ComponentModel.INotifyPropertyChanged
System.IDisposable

Constructors

View Source

GLView(GLView.ColorFormat)

Creates an initialized GLView.

Declaration
C#
Copy
public GLView(GLView.ColorFormat colorFormat)
Parameters
Type Name Description
GLView.ColorFormat colorFormat

The format of the color buffer

API Level: 10

Properties

View Source

RenderingMode

Gets or sets the rendering mode of the GLView.

Declaration
C#
Copy
public GLRenderingMode RenderingMode { get; set; }
Property Value
Type Description
GLRenderingMode
API Level: 10

Methods

View Source

RegisterGLCallbacks(GLView.GLInitializeDelegate, GLView.GLRenderFrameDelegate, GLView.GLTerminateDelegate)

Registers GL callback functions to render with OpenGL ES

Declaration
C#
Copy
public void RegisterGLCallbacks(GLView.GLInitializeDelegate glInit, GLView.GLRenderFrameDelegate glRenderFrame, GLView.GLTerminateDelegate glTerminate)
Parameters
Type Name Description
GLView.GLInitializeDelegate glInit

The callback function for GL initialization

GLView.GLRenderFrameDelegate glRenderFrame

The callback function to render the frame

GLView.GLTerminateDelegate glTerminate

The callback function to clean up GL resources

API Level: 10
View Source

RenderOnce()

Renders once more, even when paused.

Declaration
C#
Copy
public void RenderOnce()
API Level: 10
View Source

SetGraphicsConfig(Boolean, Boolean, Int32, GLESVersion)

Sets graphics configuration for the GLView

Declaration
C#
Copy
public bool SetGraphicsConfig(bool depth, bool stencil, int msaa, GLESVersion version)
Parameters
Type Name Description
Boolean depth

The flag of depth buffer. When the value is true, 24bit depth buffer is enabled.

Boolean stencil

The flag of stencil. When the value is true, 8bit stencil buffer is enabled.

Int32 msaa

The bit of MSAA

GLESVersion version

The GLES version

Returns
Type Description
Boolean

True if the config was successfully set, false otherwise.

API Level: 10
View Source

SetResizeCallback(GLView.ViewResizeDelegate)

Sets the resize callback to the GLView. When GLView is resized, the callback is invoked and it passes the width and height.

Declaration
C#
Copy
public void SetResizeCallback(GLView.ViewResizeDelegate callback)
Parameters
Type Name Description
GLView.ViewResizeDelegate callback

The resize callback function

API Level: 10

Implements

System.ComponentModel.INotifyPropertyChanged
System.IDisposable