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.

    public class GLView : View, INotifyPropertyChanged, IDisposable
    Inheritance
    object
    BindableObject
    Tizen.NUI.Binding.Element
    BaseHandle
    Animatable
    Container
    View
    GLView
    Implements
    System.ComponentModel.INotifyPropertyChanged
    System.IDisposable

    Constructors

    View Source

    GLView(ColorFormat)

    Creates an initialized GLView.

    Declaration
    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
    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
    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
    public void RenderOnce()
    View Source

    SetGraphicsConfig(bool, bool, int, GLESVersion)

    Sets graphics configuration for the GLView

    Declaration
    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
    public void SetResizeCallback(GLView.ViewResizeDelegate callback)
    Parameters
    Type Name Description
    GLView.ViewResizeDelegate callback

    The resize callback function

    Implements

    System.ComponentModel.INotifyPropertyChanged
    System.IDisposable
    • View Source
    Back to top Copyright © 2016-2024 Samsung
    Generated by DocFX