[NUI][Scene3D][API10] FBO MultiSamplingLevel Property for SceneView
authorEunki, Hong <eunkiki.hong@samsung.com>
Fri, 27 Jan 2023 07:41:42 +0000 (16:41 +0900)
committerEunki Hong <h.pichulia@gmail.com>
Mon, 30 Jan 2023 05:24:35 +0000 (14:24 +0900)
Backporting PR of #4937

Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
src/Tizen.NUI.Scene3D/src/internal/Interop/Interop.SceneView.cs
src/Tizen.NUI.Scene3D/src/public/Controls/SceneView.cs

index ac244a3..5167345 100755 (executable)
@@ -78,6 +78,12 @@ namespace Tizen.NUI.Scene3D
             [global::System.Runtime.InteropServices.DllImport(Libraries.Scene3D, EntryPoint = "CSharp_Dali_SceneView_IsUsingFramebuffer")]
             [return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.U1)]
             public static extern bool IsUsingFramebuffer(global::System.Runtime.InteropServices.HandleRef sceneView);
+
+            [global::System.Runtime.InteropServices.DllImport(Libraries.Scene3D, EntryPoint = "CSharp_Dali_SceneView_SetFramebufferMultiSamplingLevel")]
+            public static extern void SetFramebufferMultiSamplingLevel(global::System.Runtime.InteropServices.HandleRef sceneView, uint multiSamplingLevel);
+
+            [global::System.Runtime.InteropServices.DllImport(Libraries.Scene3D, EntryPoint = "CSharp_Dali_SceneView_GetFramebufferMultiSamplingLevel")]
+            public static extern uint GetFramebufferMultiSamplingLevel(global::System.Runtime.InteropServices.HandleRef sceneView);
         }
     }
 }
index 4058de9..40289ef 100755 (executable)
@@ -154,6 +154,28 @@ namespace Tizen.NUI.Scene3D
         }
 
         /// <summary>
+        /// Set/Get the Framebuffer's MultiSamplingLevel.
+        /// Only has effects if UseFramebuffer is true, and Framebuffer MultiSampling is supported.
+        /// Default is 0.
+        /// </summary>
+        /// <remarks>
+        /// Getter didn't consider Framebuffer MultiSampling is supported or not.
+        /// </remarks>
+        // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public uint FramebufferMultiSamplingLevel
+        {
+            set
+            {
+                SetFramebufferMultiSamplingLevel(value);
+            }
+            get
+            {
+                return GetFramebufferMultiSamplingLevel();
+            }
+        }
+
+        /// <summary>
         /// Adds a Camera to the SceneView at the end of the camera list of SceneView.
         /// The Camera can be used as a selected camera to render the scene by using <see cref="SelectCamera(uint)"/> or <see cref="SelectCamera(string)"/>
         /// </summary>
@@ -397,6 +419,19 @@ namespace Tizen.NUI.Scene3D
             return result;
         }
 
+        internal void SetFramebufferMultiSamplingLevel(uint multiSamplingLevel)
+        {
+            Interop.SceneView.SetFramebufferMultiSamplingLevel(SwigCPtr, multiSamplingLevel);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+        }
+
+        internal uint GetFramebufferMultiSamplingLevel()
+        {
+            uint result = Interop.SceneView.GetFramebufferMultiSamplingLevel(SwigCPtr);
+            if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+            return result;
+        }
+
         /// <summary>
         /// Set the ImageBasedLight ScaleFactor.
         /// </summary>