Skip to content

Commit

Permalink
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions src/Tizen.NUI/src/public/BaseComponents/DirectRenderingGLView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,17 @@ public DirectRenderingGLView(ColorFormat colorFormat) : this(Interop.GLView.New(
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}

/// <summary>
/// Creates an initialized DirectRenderingGLView.
/// </summary>
/// <param name="colorFormat">The format of the color buffer</param>
/// <param name="backendMode">The backend mode</param>
[EditorBrowsable(EditorBrowsableState.Never)]
public DirectRenderingGLView(ColorFormat colorFormat, BackendMode backendMode) : this(Interop.GLView.New((int)backendMode, (int)colorFormat), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}

/// <summary>
/// Enumeration for the color format of the color buffer
/// </summary>
Expand All @@ -131,6 +142,50 @@ public enum ColorFormat
RGBA8888
}

/// <summary>
/// Enumeration for backend mode
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public enum BackendMode
{
/// <summary>
/// DirectRendering mode executes GL code within DALi graphics
/// pipeline but creates isolated context hence it doesn't alter any
/// DALi rendering state. When Renderer is about to be drawn, the callback
/// will be executed and the custom code "injected" into the pipeline.
/// This allows rendering directly to the surface rather than offscreen.
/// </summary>
DirectRendering = 0,

/// <summary>
/// DirectRenderingThread mode executes GL code on separate thread
/// and then blits the result within DALi graphics commands stream.
/// The mode is logically compatible with the EglImageOffscreenRendering.
/// </summary>
DirectRenderingThread,

/// <summary>
/// EglImageOffscreenRendering mode executes GL code in own thread
/// and renders to the offscreen NativeImage (EGL) buffer. This backend
/// will render in parallel but has higher memory footprint and may suffer
/// performance issues due to using EGL image.
/// </summary>
EglImageOffscreenRendering,

/// <summary>
/// UnsafeDirectRendering mode executes GL code within DALi graphics
/// pipeline WITHOUT isolating the GL context so should be used with caution!
/// The custom rendering code is executed within current window context and
/// may alter the GL state. This mode is considered unsafe and should be used
/// only when drawing on main GL context is necessary!
///
/// When Renderer is about to be drawn, the callback
/// will be executed and the custom code "injected" into the pipeline.
/// This allows rendering directly to the surface rather than offscreen.
/// </summary>
UnsafeDirectRendering
}

/// <summary>
/// Gets or sets the rendering mode of the DirectRenderingGLView.
/// </summary>
Expand Down

0 comments on commit dacb8b5

Please sign in to comment.