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
- Implements
-
System.ComponentModel.INotifyPropertyChangedSystem.IDisposable
Constructors
View SourceGLView(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 SourceRenderingMode
Gets or sets the rendering mode of the GLView.
Declaration
public GLRenderingMode RenderingMode { get; set; }
Property Value
Type | Description |
---|---|
GLRenderingMode |
Methods
View SourceRegisterGLCallbacks(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 |
RenderOnce()
Renders once more, even when paused.
Declaration
public void RenderOnce()
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. |
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 |