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#Copypublic class GLView : View, INotifyPropertyChanged, IDynamicResourceHandler, IElement, INameScope, IElementController, IDisposable, IResourcesProvider
- Inheritance
- Implements
-
System.ComponentModel.INotifyPropertyChangedSystem.IDisposable
Constructors
Declaration
C#Copypublic GLView(GLView.ColorFormat colorFormat)
Parameters
Type | Name | Description |
---|---|---|
GLView.ColorFormat | colorFormat | The format of the color buffer |
API Level: 10
Properties
Declaration
C#Copypublic GLRenderingMode RenderingMode { get; set; }
Property Value
Type | Description |
---|---|
GLRenderingMode |
API Level: 10
Methods
RegisterGLCallbacks(GLView.GLInitializeDelegate, GLView.GLRenderFrameDelegate, GLView.GLTerminateDelegate)
Registers GL callback functions to render with OpenGL ES
Declaration
C#Copypublic 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
Declaration
C#Copypublic void RenderOnce()
API Level: 10
SetGraphicsConfig(Boolean, Boolean, Int32, GLESVersion)
Sets graphics configuration for the GLView
Declaration
C#Copypublic 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
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#Copypublic void SetResizeCallback(GLView.ViewResizeDelegate callback)
Parameters
Type | Name | Description |
---|---|---|
GLView.ViewResizeDelegate | callback | The resize callback function |