Class GLView

Definition

Namespace:
Tizen.NUI.BaseComponents
Assembly:
Tizen.NUI.dll

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, IDisposable
Inheritance
object
Tizen.NUI.Binding.Element
GLView
Implements
System.ComponentModel.INotifyPropertyChanged
System.IDisposable

Constructors

View Source

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

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

Methods

View Source

RegisterGLCallbacks(GLInitializeDelegate, GLRenderFrameDelegate, 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

View Source

RenderOnce()

Renders once more, even when paused.

Declaration
C#
Copy
public void RenderOnce()
View Source

SetGraphicsConfig(bool, bool, int, 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
bool depth

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

bool stencil

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

int msaa

The bit of MSAA

GLESVersion version

The GLES version

Returns
Type Description
bool

True if the config was successfully set, false otherwise.

View Source

SetResizeCallback(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

Implements

System.ComponentModel.INotifyPropertyChanged
System.IDisposable