--- /dev/null
+/*
+ * Copyright(c) 2022 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Runtime.InteropServices;
+using Tizen.NUI.Binding;
+
+namespace Tizen.NUI.BaseComponents
+{
+ /// <summary>
+ /// View is the base class for all views.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public partial class View : Container, IResourcesProvider
+ {
+ /// <summary>
+ /// Gets the number of renderers held by the view.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public uint RendererCount
+ {
+ get
+ {
+ return GetRendererCount();
+ }
+ }
+
+ /// <summary>
+ /// Adds a renderer to the view.
+ /// </summary>
+ /// <param name="renderer">The renderer to add.</param>
+ /// <returns>The index of the Renderer that was added to the view.</returns>
+ /// <since_tizen> 3 </since_tizen>
+ public uint AddRenderer(Renderer renderer)
+ {
+ uint ret = Interop.Actor.AddRenderer(SwigCPtr, Renderer.getCPtr(renderer));
+ if (NDalicPINVOKE.SWIGPendingException.Pending)
+ throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// Retrieves the renderer at the specified index.
+ /// </summary>
+ /// <param name="index">The index of the renderer to retrieve.</param>
+ /// <returns>A Renderer object at the specified index.</returns>
+ /// <remarks>
+ /// The index must be between 0 and GetRendererCount()-1
+ /// </remarks>
+ /// <since_tizen> 3 </since_tizen>
+ public Renderer GetRendererAt(uint index)
+ {
+ IntPtr cPtr = Interop.Actor.GetRendererAt(SwigCPtr, index);
+ Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Renderer;
+ if (ret != null)
+ {
+ Interop.BaseHandle.DeleteBaseHandle(new HandleRef(this, cPtr));
+ }
+ else
+ {
+ ret = new Renderer(cPtr, true);
+ }
+ NDalicPINVOKE.ThrowExceptionIfExists();
+ return ret;
+ }
+
+ /// <summary>
+ /// Removes the specified renderer from the view.
+ /// </summary>
+ /// <param name="renderer">The renderer to remove.</param>
+ /// <since_tizen> 3 </since_tizen>
+ public void RemoveRenderer(Renderer renderer)
+ {
+ Interop.Actor.RemoveRenderer(SwigCPtr, Renderer.getCPtr(renderer));
+ if (NDalicPINVOKE.SWIGPendingException.Pending)
+ throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// Removes a renderer at the specified index from the view.
+ /// </summary>
+ /// <param name="index">The index of the renderer to remove.</param>
+ /// <since_tizen> 3 </since_tizen>
+ public void RemoveRenderer(uint index)
+ {
+ Interop.Actor.RemoveRenderer(SwigCPtr, index);
+ if (NDalicPINVOKE.SWIGPendingException.Pending)
+ throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+namespace Tizen.NUI
+{
+ /// <summary>
+ /// Enumeration of the type of possible filter modes.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public enum FilterModeType
+ {
+ /// <summary>
+ /// Use GL defaults (minification NEAREST_MIPMAP_LINEAR, magnification LINEAR).
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ NONE = 0,
+ /// <summary>
+ /// Use Dali defaults (minification LINEAR, magnification LINEAR).
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ DEFAULT,
+ /// <summary>
+ /// Filter nearest.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ NEAREST,
+ /// <summary>
+ /// Filter linear.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ LINEAR,
+ /// <summary>
+ /// Filter nearest mipmap nearest.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ NEAREST_MIPMAP_NEAREST,
+ /// <summary>
+ /// Filter linear mipmap nearest.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ LINEAR_MIPMAP_NEAREST,
+ /// <summary>
+ /// Filter nearest mipmap linear.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ NEAREST_MIPMAP_LINEAR,
+ /// <summary>
+ /// Filter linear mipmap linear.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ LINEAR_MIPMAP_LINEAR
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2021 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System.ComponentModel;
+
+namespace Tizen.NUI
+{
+ /// <summary>
+ /// Geometry is handle to an object that can be used to define a geometric elements.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public partial class Geometry : BaseHandle
+ {
+ /// <summary>
+ /// Enumeration for the description of the type of geometry,
+ /// used to determine how the coordinates will be used.
+ /// </summary>
+ /// <returns>Type of primitives this geometry contains.</returns>
+ /// <since_tizen> 3 </since_tizen>
+ public enum Type
+ {
+ /// <summary>
+ /// Individual points.
+ /// </summary>
+ POINTS,
+
+ /// <summary>
+ /// Individual lines (made of 2 points each).
+ /// </summary>
+ LINES,
+
+ /// <summary>
+ /// A strip of lines (made of 1 point each) which also joins the first and last point.
+ /// </summary>
+ LINE_LOOP,
+
+ /// <summary>
+ /// A strip of lines (made of 1 point each).
+ /// </summary>
+ LINE_STRIP,
+
+ /// <summary>
+ /// Individual triangles (made of 3 points each).
+ /// </summary>
+ TRIANGLES,
+
+ /// <summary>
+ /// A fan of triangles around a centre point (after the first triangle, following triangles need only 1 point).
+ /// </summary>
+ TRIANGLE_FAN,
+
+ /// <summary>
+ /// A strip of triangles (after the first triangle, following triangles need only 1 point).
+ /// </summary>
+ TRIANGLE_STRIP
+ }
+
+ /// <summary>
+ /// Adds a PropertyBuffer to be used as source of geometry vertices.
+ /// </summary>
+ /// <param name="vertexBuffer">PropertyBuffer to be used as source of geometry vertices.</param>
+ /// <returns>Index of the newly added buffer.</returns>
+ /// <since_tizen> 3 </since_tizen>
+ public uint AddVertexBuffer(PropertyBuffer vertexBuffer)
+ {
+ uint ret = Interop.Geometry.AddVertexBuffer(SwigCPtr, PropertyBuffer.getCPtr(vertexBuffer));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
+ /// Sets the type of primitives this geometry contains.
+ /// </summary>
+ /// <param name="geometryType">Array of indices.</param>
+ /// <since_tizen> 3 </since_tizen>
+ public void SetType(Geometry.Type geometryType)
+ {
+ Interop.Geometry.SetType(SwigCPtr, (int)geometryType);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// Gets the type of primitives this geometry contains.
+ /// </summary>
+ /// <returns>Type of primitives this geometry contains.</returns>
+ /// <since_tizen> 3 </since_tizen>
+ public new Geometry.Type GetType()
+ {
+ Geometry.Type ret = (Geometry.Type)Interop.Geometry.GetType(SwigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+ }
+}
--- /dev/null
+// Copyright (c) 2023 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+using System.ComponentModel;
+
+namespace Tizen.NUI
+{
+ /// <summary>
+ /// Enumeration for face culling mode.
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public enum FaceCullingModeType
+ {
+ /// <summary>
+ /// None of the faces should be culled
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ None = 0,
+
+ /// <summary>
+ /// Cull front face, front faces should never be shown
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Front,
+
+ /// <summary>
+ /// Cull back face, back faces should never be shown
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Back,
+
+ /// <summary>
+ /// Cull front and back faces; if the geometry is composed of triangles none of the faces will be shown
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ FrontAndBack,
+ }
+
+ /// <summary>
+ /// Enumeration for blend mode.
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public enum BlendModeType
+ {
+ /// <summary>
+ /// Blending is disabled.
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Off = 0,
+
+ /// <summary>
+ /// Blending is enabled if there is alpha channel. This is the default mode.
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Auto,
+
+ /// <summary>
+ /// Blending is enabled.
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ On,
+
+ /// <summary>
+ /// Blending is enabled, and don't cull the renderer.
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ OnWithoutCull,
+
+ /// <summary>
+ /// Blending is enabled when the actor is not opaque
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ UseActorOpacity,
+ }
+
+ /// <summary>
+ /// Enumeration for blend equation.
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public enum BlendEquationType
+ {
+ /// <summary>
+ /// The source and destination colors are added to each other.
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Add = 0x8006,
+
+ /// <summary>
+ /// Use minimum value of the source and the destination.
+ /// </summary>
+ /// <remark>
+ /// It will be supported only if OpenGL es 3.0 or higher version using.
+ /// </remark>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Min = 0x8007,
+
+ /// <summary>
+ /// Use maximum value of the source and the destination.
+ /// </summary>
+ /// <remark>
+ /// It will be supported only if OpenGL es 3.0 or higher version using.
+ /// </remark>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Max = 0x8008,
+
+ /// <summary>
+ /// Subtracts the destination from the source.
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Subtract = 0x800A,
+
+ /// <summary>
+ /// Subtracts the source from the destination.
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ ReverseSubtract = 0x800B,
+
+ //Advanced Blend Equation
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Multiply = 0x9294,
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Screen = 0x9295,
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Overlay = 0x9296,
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Darken = 0x9297,
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Lighten = 0x9298,
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ ColorDodge = 0x9299,
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ ColorBurn = 0x929A,
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ HardLight = 0x929B,
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ SoftLight = 0x929C,
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Difference = 0x929E,
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Exclusion = 0x92A0,
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Hue = 0x92AD,
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Saturation = 0x92AE,
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Color = 0x92AF,
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Luminosity = 0x92B0,
+ }
+
+ /// <summary>
+ /// Enumeration for blend factor.
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public enum BlendFactorType
+ {
+ /// <summary>
+ /// Match as GL_ZERO
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Zero = 0,
+
+ /// <summary>
+ /// Match as GL_ONE
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ One = 1,
+
+ /// <summary>
+ /// Match as GL_SRC_COLOR
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ SrcColor = 0x0300,
+
+ /// <summary>
+ /// Match as GL_ONE_MINUS_SRC_COLOR
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ OneMinusSrcColor = 0x0301,
+
+ /// <summary>
+ /// Match as GL_SRC_ALPHA
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ SrcAlpha = 0x0302,
+
+ /// <summary>
+ /// Match as GL_ONE_MINUS_SRC_ALPHA
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ OneMinusSrcAlpha = 0x0303,
+
+ /// <summary>
+ /// Match as GL_DST_ALPHA
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ DstAlpha = 0x0304,
+
+ /// <summary>
+ /// Match as GL_ONE_MINUS_DST_ALPHA
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ OneMinusDstAlpha = 0x0305,
+
+ /// <summary>
+ /// Match as GL_DST_COLOR
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ DstColor = 0x0306,
+
+ /// <summary>
+ /// Match as GL_ONE_MINUS_DST_COLOR
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ OneMinusDstColor = 0x0307,
+
+ /// <summary>
+ /// Match as GL_SRC_ALPHA_SATURATE
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ SrcAlphaSaturate = 0x0308,
+
+ /// <summary>
+ /// Match as GL_CONSTANT_COLOR
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ ConstantColor = 0x8001,
+
+ /// <summary>
+ /// Match as GL_ONE_MINUS_CONSTANT_COLOR
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ OneMinusConstantColor = 0x8002,
+
+ /// <summary>
+ /// Match as GL_CONSTANT_ALPHA
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ ConstantAlpha = 0x8003,
+
+ /// <summary>
+ /// Match as GL_ONE_MINUS_CONSTANT_ALPHA
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ OneMinusConstantAlpha = 0x8004,
+ }
+
+ /// <summary>
+ /// Enumeration for depth buffer write modes.
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public enum DepthWriteModeType
+ {
+ /// <summary>
+ /// Renderer doesn't write to the depth buffer
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Off = 0,
+
+ /// <summary>
+ /// Renderer only writes to the depth buffer if it's opaque
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Auto,
+
+ /// <summary>
+ /// Renderer writes to the depth buffer
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ On,
+ }
+
+ /// <summary>
+ /// Enumeration for depth functions.
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public enum DepthFunctionType
+ {
+ /// <summary>
+ /// Depth test never passes
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Never = 0,
+
+ /// <summary>
+ /// Depth test always passes
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Always,
+
+ /// <summary>
+ /// Depth test passes if the incoming depth value is less than the stored depth value
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Less,
+
+ /// <summary>
+ /// Depth test passes if the incoming depth value is greater than the stored depth value
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Greater,
+
+ /// <summary>
+ /// Depth test passes if the incoming depth value is equal to the stored depth value
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Equal,
+
+ /// <summary>
+ /// Depth test passes if the incoming depth value is not equal to the stored depth value
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ NotEqual,
+
+ /// <summary>
+ /// Depth test passes if the incoming depth value is less than or equal to the stored depth value
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ LessEqual,
+
+ /// <summary>
+ /// Depth test passes if the incoming depth value is greater than or equal to the stored depth value
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ GreaterEqual,
+ }
+
+ /// <summary>
+ /// Enumeration for depth buffer test (read) modes.
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public enum DepthTestModeType
+ {
+ /// <summary>
+ /// Renderer does not read from the depth buffer
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Off = 0,
+
+ /// <summary>
+ /// Renderer only reads from the depth buffer if in a 3D layer
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Auto,
+
+ /// <summary>
+ /// Renderer reads from the depth buffer based on the DepthFunction
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ On,
+ }
+
+ /// <summary>
+ /// Enumeration for the controls of how this renderer uses its stencil properties and writes to the color buffer.
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public enum RenderModeType
+ {
+ /// <summary>
+ /// Do not write to either color or stencil buffer (But will potentially render to depth buffer).
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ None = 0,
+
+ /// <summary>
+ /// Managed by the View Clipping API. This is the default.
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Auto,
+
+ /// <summary>
+ /// Ingore stencil properties. Write to the color buffer.
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Color,
+
+ /// <summary>
+ /// Use the stencil properties. Do not write to the color buffer.
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Stencil,
+
+ /// <summary>
+ /// Use the stencil properties AND Write to the color buffer.
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ ColorStencil,
+ }
+
+ /// <summary>
+ /// Enumeration for the comparison function used on the stencil buffer.
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public enum StencilFunctionType
+ {
+ /// <summary>
+ /// Always fails
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Never = 0,
+
+ /// <summary>
+ /// Passes if <![CDATA[ ( reference & mask ) < ( stencil & mask ) ]]>
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Less,
+
+ /// <summary>
+ /// Passes if <![CDATA[ ( reference & mask ) = ( stencil & mask ) ]]>
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Equal,
+
+ /// <summary>
+ /// Passes if <![CDATA[ ( reference & mask ) <= ( stencil & mask ) ]]>
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ LessEqual,
+
+ /// <summary>
+ /// Passes if <![CDATA[ ( reference & mask ) > ( stencil & mask ) ]]>
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Greater,
+
+ /// <summary>
+ /// Passes if <![CDATA[ ( reference & mask ) != ( stencil & mask ) ]]>
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ NotEqual,
+
+ /// <summary>
+ /// Passes if <![CDATA[ ( reference & mask ) >= ( stencil & mask ) ]]>
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ GreaterEqual,
+
+ /// <summary>
+ /// Always passes
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Always,
+ }
+
+ /// <summary>
+ /// Enumeration for specifying the action to take when the stencil (or depth) test fails during stencil test.
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public enum StencilOperationType
+ {
+ /// <summary>
+ /// Sets the stencil buffer value to 0
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Zero = 0,
+
+ /// <summary>
+ /// Keeps the current value
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Keep,
+
+ /// <summary>
+ /// Sets the stencil buffer value to ref, as specified by glStencilFunc
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Replace,
+
+ /// <summary>
+ /// Increments the current stencil buffer value. Clamps to the maximum representable unsigned value
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Increment,
+
+ /// <summary>
+ /// Decrements the current stencil buffer value. Clamps to 0
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Decrement,
+
+ /// <summary>
+ /// Bitwise inverts the current stencil buffer value
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Invert,
+
+ /// <summary>
+ /// Increments the current stencil buffer value.
+ /// Wraps stencil buffer value to zero when incrementing the maximum representable unsigned value
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ IncrementWrap,
+
+ /// <summary>
+ /// Decrements the current stencil buffer value.
+ /// Wraps stencil buffer value to the maximum representable unsigned value when decrementing a stencil buffer value of zero
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ DecrementWrap,
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2021 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using System.ComponentModel;
+using System.Diagnostics.CodeAnalysis;
+using System.Runtime.InteropServices;
+
+namespace Tizen.NUI
+{
+ /// <summary>
+ /// Renderer is a handle to an object used to show content by combining a Geometry, a TextureSet and a shader.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public class Renderer : Animatable
+ {
+ private Geometry CurrentGeometry = null;
+ private Shader CurrentShader = null;
+
+ /// <summary>
+ /// Create an instance of Renderer.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public Renderer(Geometry geometry, Shader shader) : this(Interop.Renderer.New(Geometry.getCPtr(geometry), Shader.getCPtr(shader)), true)
+ {
+ CurrentGeometry = geometry;
+ CurrentShader = shader;
+
+ NDalicPINVOKE.ThrowExceptionIfExists();
+ }
+
+ /// <summary>
+ /// Create an instance of Renderer without Geometry or Shader.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Renderer() : this(Interop.Renderer.New(), true)
+ {
+ NDalicPINVOKE.ThrowExceptionIfExists();
+ }
+
+ /// <summary>
+ /// Gets and Sets DepthIndex property.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public int DepthIndex
+ {
+ get
+ {
+ int temp = 0;
+ Tizen.NUI.PropertyValue pValue = Tizen.NUI.Object.GetProperty(SwigCPtr, Renderer.Property.DepthIndex);
+ pValue.Get(out temp);
+ pValue.Dispose();
+ return temp;
+ }
+ set
+ {
+ var temp = new Tizen.NUI.PropertyValue(value);
+ Tizen.NUI.Object.SetProperty(SwigCPtr, Renderer.Property.DepthIndex, temp);
+ temp.Dispose();
+ }
+ }
+
+ /// <summary>
+ /// Gets and Sets FaceCullingMode.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public int FaceCullingMode
+ {
+ get
+ {
+ return (int)InternalFaceCullingMode;
+ }
+ set
+ {
+ InternalFaceCullingMode = (FaceCullingModeType)value;
+ }
+ }
+
+ /// <summary>
+ /// Gets and Sets FaceCullingMode by FaceCullingModeType enum.
+ /// </summary>
+ private FaceCullingModeType InternalFaceCullingMode
+ {
+ get
+ {
+ return (FaceCullingModeType)Object.InternalGetPropertyInt(SwigCPtr, Renderer.Property.FaceCullingMode);
+ }
+ set
+ {
+ Object.InternalSetPropertyInt(SwigCPtr, Renderer.Property.FaceCullingMode, (int)value);
+ }
+ }
+
+ /// <summary>
+ /// Gets and Sets BlendMode.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public int BlendMode
+ {
+ get
+ {
+ return (int)InternalBlendMode;
+ }
+ set
+ {
+ InternalBlendMode = (BlendModeType)value;
+ }
+ }
+
+ /// <summary>
+ /// Gets and Sets BlendMode by BlendModeType enum.
+ /// </summary>
+ private BlendModeType InternalBlendMode
+ {
+ get
+ {
+ return (BlendModeType)Object.InternalGetPropertyInt(SwigCPtr, Renderer.Property.BlendMode);
+ }
+ set
+ {
+ Object.InternalSetPropertyInt(SwigCPtr, Renderer.Property.BlendMode, (int)value);
+ }
+ }
+
+ /// <summary>
+ /// Gets and Sets BlendEquationRgb.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public int BlendEquationRgb
+ {
+ get
+ {
+ return (int)InternalBlendEquationRgb;
+ }
+ set
+ {
+ InternalBlendEquationRgb = (BlendEquationType)value;
+ }
+ }
+
+ /// <summary>
+ /// Gets and Sets BlendEquationRgb by BlendEquationType enum.
+ /// </summary>
+ private BlendEquationType InternalBlendEquationRgb
+ {
+ get
+ {
+ return (BlendEquationType)Object.InternalGetPropertyInt(SwigCPtr, Renderer.Property.BlendEquationRgb);
+ }
+ set
+ {
+ Object.InternalSetPropertyInt(SwigCPtr, Renderer.Property.BlendEquationRgb, (int)value);
+ }
+ }
+
+ /// <summary>
+ /// Gets and Sets BlendEquationAlpha.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public int BlendEquationAlpha
+ {
+ get
+ {
+ return (int)InternalBlendEquationAlpha;
+ }
+ set
+ {
+ InternalBlendEquationAlpha = (BlendEquationType)value;
+ }
+ }
+
+ /// <summary>
+ /// Gets and Sets BlendEquationRgb by BlendEquationType enum.
+ /// </summary>
+ private BlendEquationType InternalBlendEquationAlpha
+ {
+ get
+ {
+ return (BlendEquationType)Object.InternalGetPropertyInt(SwigCPtr, Renderer.Property.BlendEquationAlpha);
+ }
+ set
+ {
+ Object.InternalSetPropertyInt(SwigCPtr, Renderer.Property.BlendEquationAlpha, (int)value);
+ }
+ }
+
+ /// <summary>
+ /// Gets and Sets BlendFactorSrcRgb.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public int BlendFactorSrcRgb
+ {
+ get
+ {
+ return (int)InternalBlendFactorSrcRgb;
+ }
+ set
+ {
+ InternalBlendFactorSrcRgb = (BlendFactorType)value;
+ }
+ }
+
+ /// <summary>
+ /// Gets and Sets BlendFactorSrcRgb by BlendFactorType enum.
+ /// </summary>
+ private BlendFactorType InternalBlendFactorSrcRgb
+ {
+ get
+ {
+ return (BlendFactorType)Object.InternalGetPropertyInt(SwigCPtr, Renderer.Property.BlendFactorSrcRgb);
+ }
+ set
+ {
+ Object.InternalSetPropertyInt(SwigCPtr, Renderer.Property.BlendFactorSrcRgb, (int)value);
+ }
+ }
+
+ /// <summary>
+ /// Gets and Sets BlendFactorDestRgb.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public int BlendFactorDestRgb
+ {
+ get
+ {
+ return (int)InternalBlendFactorDestRgb;
+ }
+ set
+ {
+ InternalBlendFactorDestRgb = (BlendFactorType)value;
+ }
+ }
+
+ /// <summary>
+ /// Gets and Sets BlendFactorDestRgb by BlendFactorType enum.
+ /// </summary>
+ private BlendFactorType InternalBlendFactorDestRgb
+ {
+ get
+ {
+ return (BlendFactorType)Object.InternalGetPropertyInt(SwigCPtr, Renderer.Property.BlendFactorDestRgb);
+ }
+ set
+ {
+ Object.InternalSetPropertyInt(SwigCPtr, Renderer.Property.BlendFactorDestRgb, (int)value);
+ }
+ }
+
+ /// <summary>
+ /// Gets and Sets BlendFactorSrcAlpha.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public int BlendFactorSrcAlpha
+ {
+ get
+ {
+ return (int)InternalBlendFactorSrcAlpha;
+ }
+ set
+ {
+ InternalBlendFactorSrcAlpha = (BlendFactorType)value;
+ }
+ }
+
+ /// <summary>
+ /// Gets and Sets BlendFactorSrcAlpha by BlendFactorType enum.
+ /// </summary>
+ private BlendFactorType InternalBlendFactorSrcAlpha
+ {
+ get
+ {
+ return (BlendFactorType)Object.InternalGetPropertyInt(SwigCPtr, Renderer.Property.BlendFactorSrcAlpha);
+ }
+ set
+ {
+ Object.InternalSetPropertyInt(SwigCPtr, Renderer.Property.BlendFactorSrcAlpha, (int)value);
+ }
+ }
+
+ /// <summary>
+ /// Gets and Sets BlendFactorDestAlpha.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public int BlendFactorDestAlpha
+ {
+ get
+ {
+ return (int)InternalBlendFactorDestAlpha;
+ }
+ set
+ {
+ InternalBlendFactorDestAlpha = (BlendFactorType)value;
+ }
+ }
+
+ /// <summary>
+ /// Gets and Sets BlendFactorDestAlpha by BlendFactorType enum.
+ /// </summary>
+ private BlendFactorType InternalBlendFactorDestAlpha
+ {
+ get
+ {
+ return (BlendFactorType)Object.InternalGetPropertyInt(SwigCPtr, Renderer.Property.BlendFactorDestAlpha);
+ }
+ set
+ {
+ Object.InternalSetPropertyInt(SwigCPtr, Renderer.Property.BlendFactorDestAlpha, (int)value);
+ }
+ }
+
+ /// <summary>
+ /// Gets and Sets BlendColor.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public Vector4 BlendColor
+ {
+ get
+ {
+ Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
+ var pValue = Tizen.NUI.Object.GetProperty(SwigCPtr, Renderer.Property.BlendColor);
+ pValue.Get(temp);
+ pValue.Dispose();
+ return temp;
+ }
+ set
+ {
+ var temp = new Tizen.NUI.PropertyValue(value);
+ Tizen.NUI.Object.SetProperty(SwigCPtr, Renderer.Property.BlendColor, temp);
+ temp.Dispose();
+ }
+ }
+
+ /// <summary>
+ /// Gets and Sets BlendPreMultipliedAlpha.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public bool BlendPreMultipliedAlpha
+ {
+ get
+ {
+ bool temp = false;
+ var pValue = Tizen.NUI.Object.GetProperty(SwigCPtr, Renderer.Property.BlendPreMultipliedAlpha);
+ pValue.Get(out temp);
+ pValue.Dispose();
+ return temp;
+ }
+ set
+ {
+ var temp = new Tizen.NUI.PropertyValue(value);
+ Tizen.NUI.Object.SetProperty(SwigCPtr, Renderer.Property.BlendPreMultipliedAlpha, temp);
+ temp.Dispose();
+ }
+ }
+
+ /// <summary>
+ /// Gets and Sets IndexRangeFirst.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public int IndexRangeFirst
+ {
+ get
+ {
+ int temp = 0;
+ var pValue = Tizen.NUI.Object.GetProperty(SwigCPtr, Renderer.Property.IndexRangeFirst);
+ pValue.Get(out temp);
+ pValue.Dispose();
+ return temp;
+ }
+ set
+ {
+ var temp = new Tizen.NUI.PropertyValue(value);
+ Tizen.NUI.Object.SetProperty(SwigCPtr, Renderer.Property.IndexRangeFirst, temp);
+ temp.Dispose();
+ }
+ }
+
+ /// <summary>
+ /// Gets and Sets IndexRangeCount.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public int IndexRangeCount
+ {
+ get
+ {
+ int temp = 0;
+ var pValue = Tizen.NUI.Object.GetProperty(SwigCPtr, Renderer.Property.IndexRangeCount);
+ pValue.Get(out temp);
+ pValue.Dispose();
+ return temp;
+ }
+ set
+ {
+ var temp = new Tizen.NUI.PropertyValue(value);
+ Tizen.NUI.Object.SetProperty(SwigCPtr, Renderer.Property.IndexRangeCount, temp);
+ temp.Dispose();
+ }
+ }
+
+ /// <summary>
+ /// Gets and Sets DepthWriteMode.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public int DepthWriteMode
+ {
+ get
+ {
+ return (int)InternalDepthWriteMode;
+ }
+ set
+ {
+ InternalDepthWriteMode = (DepthWriteModeType)value;
+ }
+ }
+
+ /// <summary>
+ /// Gets and Sets DepthWriteMode by DepthWriteModeType enum.
+ /// </summary>
+ private DepthWriteModeType InternalDepthWriteMode
+ {
+ get
+ {
+ return (DepthWriteModeType)Object.InternalGetPropertyInt(SwigCPtr, Renderer.Property.DepthWriteMode);
+ }
+ set
+ {
+ Object.InternalSetPropertyInt(SwigCPtr, Renderer.Property.DepthWriteMode, (int)value);
+ }
+ }
+
+ /// <summary>
+ /// Gets and Sets DepthFunction.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public int DepthFunction
+ {
+ get
+ {
+ return (int)InternalDepthFunction;
+ }
+ set
+ {
+ InternalDepthFunction = (DepthFunctionType)value;
+ }
+ }
+
+ /// <summary>
+ /// Gets and Sets DepthFunction by DepthFunctionType enum.
+ /// </summary>
+ private DepthFunctionType InternalDepthFunction
+ {
+ get
+ {
+ return (DepthFunctionType)Object.InternalGetPropertyInt(SwigCPtr, Renderer.Property.DepthFunction);
+ }
+ set
+ {
+ Object.InternalSetPropertyInt(SwigCPtr, Renderer.Property.DepthFunction, (int)value);
+ }
+ }
+
+ /// <summary>
+ /// Gets and Sets DepthTestMode.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public int DepthTestMode
+ {
+ get
+ {
+ return (int)InternalDepthTestMode;
+ }
+ set
+ {
+ InternalDepthTestMode = (DepthTestModeType)value;
+ }
+ }
+
+ /// <summary>
+ /// Gets and Sets DepthTestMode by DepthTestModeType enum.
+ /// </summary>
+ private DepthTestModeType InternalDepthTestMode
+ {
+ get
+ {
+ return (DepthTestModeType)Object.InternalGetPropertyInt(SwigCPtr, Renderer.Property.DepthTestMode);
+ }
+ set
+ {
+ Object.InternalSetPropertyInt(SwigCPtr, Renderer.Property.DepthTestMode, (int)value);
+ }
+ }
+
+ /// <summary>
+ /// Gets and Sets RenderMode.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public int RenderMode
+ {
+ get
+ {
+ return (int)InternalRenderMode;
+ }
+ set
+ {
+ InternalRenderMode = (RenderModeType)value;
+ }
+ }
+
+ /// <summary>
+ /// Gets and Sets RenderMode by RenderModeType enum.
+ /// </summary>
+ private RenderModeType InternalRenderMode
+ {
+ get
+ {
+ return (RenderModeType)Object.InternalGetPropertyInt(SwigCPtr, Renderer.Property.RenderMode);
+ }
+ set
+ {
+ Object.InternalSetPropertyInt(SwigCPtr, Renderer.Property.RenderMode, (int)value);
+ }
+ }
+
+ /// <summary>
+ /// Gets and Sets StencilFunction.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public int StencilFunction
+ {
+ get
+ {
+ return (int)InternalStencilFunction;
+ }
+ set
+ {
+ InternalStencilFunction = (StencilFunctionType)value;
+ }
+ }
+
+ /// <summary>
+ /// Gets and Sets StencilFunction by StencilFunctionType enum.
+ /// </summary>
+ private StencilFunctionType InternalStencilFunction
+ {
+ get
+ {
+ return (StencilFunctionType)Object.InternalGetPropertyInt(SwigCPtr, Renderer.Property.StencilFunction);
+ }
+ set
+ {
+ Object.InternalSetPropertyInt(SwigCPtr, Renderer.Property.StencilFunction, (int)value);
+ }
+ }
+
+ /// <summary>
+ /// Gets and Sets StencilFunctionMask.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public int StencilFunctionMask
+ {
+ get
+ {
+ int temp = 0;
+ var pValue = Tizen.NUI.Object.GetProperty(SwigCPtr, Renderer.Property.StencilFunctionMask);
+ pValue.Get(out temp);
+ pValue.Dispose();
+ return temp;
+ }
+ set
+ {
+ var temp = new Tizen.NUI.PropertyValue(value);
+ Tizen.NUI.Object.SetProperty(SwigCPtr, Renderer.Property.StencilFunctionMask, temp);
+ temp.Dispose();
+ }
+ }
+
+ /// <summary>
+ /// Gets and Sets StencilFunctionReference.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public int StencilFunctionReference
+ {
+ get
+ {
+ int temp = 0;
+ var pValue = Tizen.NUI.Object.GetProperty(SwigCPtr, Renderer.Property.StencilFunctionReference);
+ pValue.Get(out temp);
+ pValue.Dispose();
+ return temp;
+ }
+ set
+ {
+ var temp = new Tizen.NUI.PropertyValue(value);
+ Tizen.NUI.Object.SetProperty(SwigCPtr, Renderer.Property.StencilFunctionReference, temp);
+ temp.Dispose();
+ }
+ }
+
+ /// <summary>
+ /// Gets and Sets StencilMask.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public int StencilMask
+ {
+ get
+ {
+ int temp = 0;
+ var pValue = Tizen.NUI.Object.GetProperty(SwigCPtr, Renderer.Property.StencilMask);
+ pValue.Get(out temp);
+ pValue.Dispose();
+ return temp;
+ }
+ set
+ {
+ var temp = new Tizen.NUI.PropertyValue(value);
+ Tizen.NUI.Object.SetProperty(SwigCPtr, Renderer.Property.StencilMask, temp);
+ temp.Dispose();
+ }
+ }
+
+ /// <summary>
+ /// Gets and Sets StencilOperationOnFail.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public int StencilOperationOnFail
+ {
+ get
+ {
+ return (int)InternalStencilOperationOnFail;
+ }
+ set
+ {
+ InternalStencilOperationOnFail = (StencilOperationType)value;
+ }
+ }
+
+ /// <summary>
+ /// Gets and Sets StencilOperationOnFail by StencilOperationType enum.
+ /// </summary>
+ private StencilOperationType InternalStencilOperationOnFail
+ {
+ get
+ {
+ return (StencilOperationType)Object.InternalGetPropertyInt(SwigCPtr, Renderer.Property.StencilOperationOnFail);
+ }
+ set
+ {
+ Object.InternalSetPropertyInt(SwigCPtr, Renderer.Property.StencilOperationOnFail, (int)value);
+ }
+ }
+
+ /// <summary>
+ /// Gets and Sets StencilOperationOnZFail.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public int StencilOperationOnZFail
+ {
+ get
+ {
+ return (int)InternalStencilOperationOnZFail;
+ }
+ set
+ {
+ InternalStencilOperationOnZFail = (StencilOperationType)value;
+ }
+ }
+
+
+ /// <summary>
+ /// Gets and Sets StencilOperationOnZFail by StencilOperationType enum.
+ /// </summary>
+ private StencilOperationType InternalStencilOperationOnZFail
+ {
+ get
+ {
+ return (StencilOperationType)Object.InternalGetPropertyInt(SwigCPtr, Renderer.Property.StencilOperationOnZFail);
+ }
+ set
+ {
+ Object.InternalSetPropertyInt(SwigCPtr, Renderer.Property.StencilOperationOnZFail, (int)value);
+ }
+ }
+
+ /// <summary>
+ /// Gets and Sets StencilOperationOnZPass property.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public int StencilOperationOnZPass
+ {
+ get
+ {
+ return (int)InternalStencilOperationOnZPass;
+ }
+ set
+ {
+ InternalStencilOperationOnZPass = (StencilOperationType)value;
+ }
+ }
+
+ /// <summary>
+ /// Gets and Sets StencilOperationOnZPass property by StencilOperationType enum.
+ /// </summary>
+ private StencilOperationType InternalStencilOperationOnZPass
+ {
+ get
+ {
+ return (StencilOperationType)Object.InternalGetPropertyInt(SwigCPtr, Renderer.Property.StencilOperationOnZPass);
+ }
+ set
+ {
+ Object.InternalSetPropertyInt(SwigCPtr, Renderer.Property.StencilOperationOnZPass, (int)value);
+ }
+ }
+
+ /// <summary>
+ /// Gets and Sets extents of partial update area.
+ /// </summary>
+ /// <remarks>
+ /// Extents the area - the position and the size - used for the attached View's partial update area calculation.
+ /// This value be appended after calculate all update area, like visual offset.
+ /// Change <see cref="Tizen.NUI.BaseComponents.View.UpdateAreaHint"/> value if you want to change View's partial update area.
+ /// Warning : Only 0u ~ 65535u integer values are allowed for each parameters.
+ /// </remarks>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public UIExtents UpdateArea
+ {
+ get
+ {
+ // TODO : Clean up below logics
+ using Extents temp = new Extents();
+ using var pValue = Tizen.NUI.Object.GetProperty(SwigCPtr, Renderer.Property.UpdateAreaExtents);
+ pValue.Get(temp);
+
+ if (temp == null)
+ {
+ return new UIExtents(0.0f);
+ }
+ UIExtents result = new UIExtents((float)temp.Start, (float)temp.End, (float)temp.Top, (float)temp.Bottom);
+ return result;
+ }
+ set
+ {
+ using var temp = new Tizen.NUI.PropertyValue((Extents)value);
+ Tizen.NUI.Object.SetProperty(SwigCPtr, Renderer.Property.UpdateAreaExtents, temp);
+ }
+ }
+
+ /// <summary>
+ /// Sets the geometry to be used by this renderer.
+ /// </summary>
+ /// <param name="geometry">The geometry to be used by this renderer.</param>
+ /// <since_tizen> 3 </since_tizen>
+ public void SetGeometry(Geometry geometry)
+ {
+ Interop.Renderer.SetGeometry(SwigCPtr, Geometry.getCPtr(CurrentGeometry = geometry));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// Gets the geometry used by this renderer.
+ /// </summary>
+ /// <returns>The geometry used by the renderer.</returns>
+ /// <since_tizen> 3 </since_tizen>
+ public Geometry GetGeometry()
+ {
+ return CurrentGeometry;
+ }
+
+ /// <summary>
+ /// Sets effective range of indices to draw from bound index buffer.
+ /// </summary>
+ /// <param name="firstElement">The First element to draw.</param>
+ /// <param name="elementsCount">The number of elements to draw.</param>
+ /// <since_tizen> 3 </since_tizen>
+ public void SetIndexRange(int firstElement, int elementsCount)
+ {
+ Interop.Renderer.SetIndexRange(SwigCPtr, firstElement, elementsCount);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// Sets the texture set to be used by this renderer.
+ /// </summary>
+ /// <param name="textureSet">The texture set to be used by this renderer.</param>
+ /// <since_tizen> 3 </since_tizen>
+ public void SetTextures(TextureSet textureSet)
+ {
+ Interop.Renderer.SetTextures(SwigCPtr, TextureSet.getCPtr(textureSet));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// Gets the texture set used by this renderer.
+ /// </summary>
+ /// <returns>The texture set used by the renderer.</returns>
+ /// <since_tizen> 3 </since_tizen>
+ public TextureSet GetTextures()
+ {
+ global::System.IntPtr cPtr = Interop.Renderer.GetTextures(SwigCPtr);
+ TextureSet ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as TextureSet;
+ if (ret != null)
+ {
+ Interop.BaseHandle.DeleteBaseHandle(new global::System.Runtime.InteropServices.HandleRef(this, cPtr));
+ }
+ else
+ {
+ ret = new TextureSet(cPtr, true);
+ }
+ NDalicPINVOKE.ThrowExceptionIfExists();
+ return ret;
+ }
+
+ /// <summary>
+ /// Sets the shader used by this renderer.
+ /// </summary>
+ /// <param name="shader">The shader to be used by this renderer.</param>
+ /// <since_tizen> 3 </since_tizen>
+ public void SetShader(Shader shader)
+ {
+ Interop.Renderer.SetShader(SwigCPtr, Shader.getCPtr(CurrentShader = shader));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// Gets the shader used by this renderer.
+ /// </summary>
+ /// <returns>The shader used by the renderer.</returns>
+ /// <since_tizen> 3 </since_tizen>
+ public Shader GetShader()
+ {
+ return CurrentShader;
+ }
+
+ internal Renderer(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
+ {
+ }
+
+ /// <summary>
+ /// you can override it to clean-up your own resources.
+ /// </summary>
+ /// <param name="type">DisposeTypes</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ protected override void Dispose(DisposeTypes type)
+ {
+ if (Disposed)
+ {
+ return;
+ }
+
+ if (type == DisposeTypes.Explicit)
+ {
+ //Called by User
+ //Release your own managed resources here.
+ //You should release all of your own disposable objects here.
+
+ CurrentGeometry = null;
+ CurrentShader = null;
+ }
+
+ //Release your own unmanaged resources here.
+ //You should not access any managed member here except static instance.
+ //because the execution order of Finalizes is non-deterministic.
+
+ base.Dispose(type);
+ }
+
+ /// This will not be public opened.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
+ {
+ Interop.Renderer.DeleteRenderer(swigCPtr);
+ }
+
+ /// This will be opened API after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public sealed class Ranges
+ {
+ /// This will be opened API after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly int BackgroundEffect = Interop.Renderer.RangesBackgroundEffectGet();
+
+ /// This will be opened API after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly int Background = Interop.Renderer.RangesBackgroundGet();
+
+ /// This will be opened API after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly int Content = Interop.Renderer.RangesContentGet();
+
+ /// This will be opened API after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly int Decoration = Interop.Renderer.RangesDecorationGet();
+
+ /// This will be opened API after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly int ForegroundEffect = Interop.Renderer.RangesForegroundEffectGet();
+
+
+
+ [Obsolete("Do not use this, that is deprecated in API9 and will be removed in API11. Use BackgroundEffect instead.")]
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ [SuppressMessage("Naming", "CA1707:Identifiers should not contain underscores", Justification = "<Pending>")]
+ public static readonly int BACKGROUND_EFFECT = Interop.Renderer.RangesBackgroundEffectGet();
+
+ [Obsolete("Do not use this, that is deprecated in API13 and will be removed in API15. Use Background instead.")]
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly int BACKGROUND = Interop.Renderer.RangesBackgroundGet();
+
+ [Obsolete("Do not use this, that is deprecated in API13 and will be removed in API15. Use Content instead.")]
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly int CONTENT = Interop.Renderer.RangesContentGet();
+
+ [Obsolete("Do not use this, that is deprecated in API13 and will be removed in API15. Use Decoration instead.")]
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly int DECORATION = Interop.Renderer.RangesDecorationGet();
+
+ [Obsolete("Do not use this, that is deprecated in API9 and will be removed in API11. Use ForegroundEffect instead.")]
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ [SuppressMessage("Naming", "CA1707:Identifiers should not contain underscores", Justification = "<Pending>")]
+ public static readonly int FOREGROUND_EFFECT = Interop.Renderer.RangesForegroundEffectGet();
+ }
+
+ /// <summary>
+ /// Enumeration for instances of properties belonging to the Renderer class.
+ /// </summary>
+ internal class Property
+ {
+ internal static readonly int DepthIndex = Interop.Renderer.DepthIndexGet();
+ internal static readonly int FaceCullingMode = Interop.Renderer.FaceCullingModeGet();
+ internal static readonly int BlendMode = Interop.Renderer.BlendModeGet();
+ internal static readonly int BlendEquationRgb = Interop.Renderer.BlendEquationRgbGet();
+ internal static readonly int BlendEquationAlpha = Interop.Renderer.BlendEquationAlphaGet();
+ internal static readonly int BlendFactorSrcRgb = Interop.Renderer.BlendFactorSrcRgbGet();
+ internal static readonly int BlendFactorDestRgb = Interop.Renderer.BlendFactorDestRgbGet();
+ internal static readonly int BlendFactorSrcAlpha = Interop.Renderer.BlendFactorSrcAlphaGet();
+ internal static readonly int BlendFactorDestAlpha = Interop.Renderer.BlendFactorDestAlphaGet();
+ internal static readonly int BlendColor = Interop.Renderer.BlendColorGet();
+ internal static readonly int BlendPreMultipliedAlpha = Interop.Renderer.BlendPreMultipliedAlphaGet();
+ internal static readonly int IndexRangeFirst = Interop.Renderer.IndexRangeFirstGet();
+ internal static readonly int IndexRangeCount = Interop.Renderer.IndexRangeCountGet();
+ internal static readonly int DepthWriteMode = Interop.Renderer.DepthWriteModeGet();
+ internal static readonly int DepthFunction = Interop.Renderer.DepthFunctionGet();
+ internal static readonly int DepthTestMode = Interop.Renderer.DepthTestModeGet();
+ internal static readonly int RenderMode = Interop.Renderer.RenderModeGet();
+ internal static readonly int StencilFunction = Interop.Renderer.StencilFunctionGet();
+ internal static readonly int StencilFunctionMask = Interop.Renderer.StencilFunctionMaskGet();
+ internal static readonly int StencilFunctionReference = Interop.Renderer.StencilFunctionReferenceGet();
+ internal static readonly int StencilMask = Interop.Renderer.StencilMaskGet();
+ internal static readonly int StencilOperationOnFail = Interop.Renderer.StencilOperationOnFailGet();
+ internal static readonly int StencilOperationOnZFail = Interop.Renderer.StencilOperationOnZFailGet();
+ internal static readonly int StencilOperationOnZPass = Interop.Renderer.StencilOperationOnZPassGet();
+ internal static readonly int MixColor = Interop.Renderer.MixColorGet();
+ internal static readonly int MixColorRed = Interop.Renderer.MixColorRedGet();
+ internal static readonly int MixColorGreen = Interop.Renderer.MixColorGreenGet();
+ internal static readonly int MixColorBlue = Interop.Renderer.MixColorBlueGet();
+ internal static readonly int MixColorOpacity = Interop.Renderer.MixColorOpacityGet();
+ internal static readonly int RenderingBehavior = Interop.Renderer.RenderingBehaviorGet();
+ internal static readonly int BlendEquation = Interop.Renderer.BlendEquationGet();
+ internal static readonly int VertexRangeFirst = Interop.Renderer.IndexRangeFirstGet();
+ internal static readonly int VertexRangeCount = Interop.Renderer.IndexRangeCountGet();
+ internal static readonly int InstanceCount = Interop.Renderer.InstanceCountGet();
+ internal static readonly int UpdateAreaExtents = Interop.Renderer.UpdateAreaExtentsGet();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System.ComponentModel;
+
+namespace Tizen.NUI
+{
+ /// <summary>
+ /// Sampler is a handle to an object that can be used to provide the sampling parameters to sample textures.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public partial class Sampler : BaseHandle
+ {
+ /// <summary>
+ /// Sets the filter modes for this sampler.
+ /// </summary>
+ /// <param name="minFilter">The minification filter that will be used.</param>
+ /// <param name="magFilter">The magnification filter that will be used.</param>
+ /// <since_tizen> 3 </since_tizen>
+ public void SetFilterMode(FilterModeType minFilter, FilterModeType magFilter)
+ {
+ Interop.Sampler.SetFilterMode(SwigCPtr, (int)minFilter, (int)magFilter);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2021 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using System.ComponentModel;
+
+namespace Tizen.NUI
+{
+ /// <summary>
+ /// Shader allows custom vertex and color transformations in the GPU.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public partial class Shader : Animatable
+ {
+ /// <summary>
+ /// Creates Shader object.
+ /// </summary>
+ /// <param name="vertexShader">The vertex shader code for the effect.</param>
+ /// <param name="fragmentShader">The fragment Shader code for the effect.</param>
+ /// <param name="hints">The hints to define the geometry of the rendered object.</param>
+ /// <since_tizen> 3 </since_tizen>
+ public Shader(string vertexShader, string fragmentShader, Shader.Hint.Value hints) : this(Interop.Shader.New(vertexShader, fragmentShader, (int)hints), true)
+ {
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ internal Shader(string vertexShader, string fragmentShader, Shader.Hint.Value hints, string shaderName) : this(Interop.Shader.New(vertexShader, fragmentShader, (int)hints, shaderName ?? ""), true)
+ {
+ Name = shaderName ?? "";
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// The Hint class is used to provide additional information to the shader.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public sealed class Hint
+ {
+ /// <summary>
+ /// Enumeration for the hint value.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public enum Value
+ {
+ /// <summary>
+ /// No hints.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ NONE = 0x00,
+
+ /// <summary>
+ /// Might generate transparent alpha from opaque inputs
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ OUTPUT_IS_TRANSPARENT = 0x01,
+
+ /// <summary>
+ /// Might change position of vertices, this option disables any culling optimizations
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ MODIFIES_GEOMETRY = 0x02
+ }
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System.ComponentModel;
+using System.Runtime.InteropServices;
+
+namespace Tizen.NUI
+{
+ /// <summary>
+ /// TextureSet is a handle to an object that specifies the set of images used as textures by a renderer.<br />
+ /// The images have to be ordered in the same order they are declared in the shader.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public partial class TextureSet : BaseHandle
+ {
+ /// <summary>
+ /// Gets the number of textures present in the TextureSet.
+ /// </summary>
+ /// <returns>The number of textures in the TextureSet.</returns>
+ /// <since_tizen> 3 </since_tizen>
+ public uint GetTextureCount()
+ {
+ uint ret = Interop.TextureSet.GetTextureCount(SwigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2021 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+namespace Tizen.NUI
+{
+ /// <summary>
+ /// The TextureType enumeration defines the types of textures.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public enum TextureType
+ {
+ /// <summary>
+ /// One 2D image
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ TEXTURE_2D,
+ /// <summary>
+ /// Six 2D images arranged in a cube-shape
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ TEXTURE_CUBE
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2017 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using System.ComponentModel;
+
+namespace Tizen.NUI
+{
+ /// <summary>
+ /// Texture represents a texture object used as input or output by shaders.
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ public partial class Texture : BaseHandle
+ {
+ /// <summary>
+ /// Creates a new Texture object.
+ /// </summary>
+ /// <param name="type">The type of the texture.</param>
+ /// <param name="format">The format of the pixel data.</param>
+ /// <param name="width">The width of the texture.</param>
+ /// <param name="height">The height of the texture.</param>
+ /// <since_tizen> 3 </since_tizen>
+ public Texture(Tizen.NUI.TextureType type, PixelFormat format, uint width, uint height) : this(Interop.Texture.New((int)type, (int)format, width, height), true)
+ {
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// Uploads data to the texture from a PixelData object.
+ /// </summary>
+ /// <param name="pixelData">The pixelData object.</param>
+ /// <param name="layer">The layer of a cube map or array texture.</param>
+ /// <param name="mipmap">The level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image.</param>
+ /// <param name="xOffset">The horizontal offset of the rectangular area in the texture that will be updated.</param>
+ /// <param name="yOffset">The vertical offset of the rectangular area in the texture that will be updated.</param>
+ /// <param name="width">The width of the rectangular area in the texture that will be updated.</param>
+ /// <param name="height">height of the rectangular area in the texture that will be updated.</param>
+ /// <returns>True if the PixelData object has compatible pixel format and fits within the texture, false otherwise.</returns>
+ /// <since_tizen> 3 </since_tizen>
+ public bool Upload(PixelData pixelData, uint layer, uint mipmap, uint xOffset, uint yOffset, uint width, uint height)
+ {
+ bool ret = Interop.Texture.Upload(SwigCPtr, PixelData.getCPtr(pixelData), layer, mipmap, xOffset, yOffset, width, height);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2020 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System;
+using System.ComponentModel;
+using System.Runtime.InteropServices;
+
+namespace Tizen.NUI
+{
+ /// <summary>
+ /// VertexBuffer is a handle to an object that contains a buffer of structured data.<br />
+ /// VertexBuffers can be used to provide data to Geometry objects.
+ /// </summary>
+ /// <since_tizen> 8 </since_tizen>
+ public partial class VertexBuffer : BaseHandle
+ {
+ /// <summary>
+ /// Gets the number of elements in the buffer.
+ /// </summary>
+ /// <returns>Number of elements in the buffer.</returns>
+ /// <since_tizen> 8 </since_tizen>
+ public uint GetSize()
+ {
+ uint ret = Interop.VertexBuffer.GetSize(SwigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending)
+ throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2024 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System;
+using System.ComponentModel;
+
+namespace Tizen.NUI
+{
+ /// <summary>
+ /// FadeTransitionItem is an object to set Fade transition of a View that will appear or disappear.
+ /// FadeTransitionItem object is required to be added to the TransitionSet to play.
+ /// </summary>
+ internal class RenderableUtility
+ {
+ public enum BlendEquationType
+ {
+ /// <summary>
+ /// The source and destination colors are added to each other.
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Add = 0x8006,
+
+ /// <summary>
+ /// Use minimum value of the source and the destination.
+ /// </summary>
+ /// <remark>
+ /// It will be supported only if OpenGL es 3.0 or higher version using.
+ /// </remark>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Min = 0x8007,
+
+ /// <summary>
+ /// Use maximum value of the source and the destination.
+ /// </summary>
+ /// <remark>
+ /// It will be supported only if OpenGL es 3.0 or higher version using.
+ /// </remark>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Max = 0x8008,
+
+ /// <summary>
+ /// Subtracts the destination from the source.
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Subtract = 0x800A,
+
+ /// <summary>
+ /// Subtracts the source from the destination.
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ ReverseSubtract = 0x800B,
+
+ //Advanced Blend Equation
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Multiply = 0x9294,
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Screen = 0x9295,
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Overlay = 0x9296,
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Darken = 0x9297,
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Lighten = 0x9298,
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ ColorDodge = 0x9299,
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ ColorBurn = 0x929A,
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ HardLight = 0x929B,
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ SoftLight = 0x929C,
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Difference = 0x929E,
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Exclusion = 0x92A0,
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Hue = 0x92AD,
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Saturation = 0x92AE,
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Color = 0x92AF,
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Luminosity = 0x92B0,
+ }
+
+ public static RenderableUtility.BlendEquationType ConvertBlendEquationTypeToUtilityProperty(Tizen.NUI.BlendEquation blendEquationType)
+ {
+ switch (blendEquationType)
+ {
+ case BlendEquation.Add:
+ {
+ return RenderableUtility.BlendEquationType.Add;
+ }
+ case BlendEquation.Min:
+ {
+ return RenderableUtility.BlendEquationType.Min;
+ }
+ case BlendEquation.Max:
+ {
+ return RenderableUtility.BlendEquationType.Max;
+ }
+ case BlendEquation.Subtract:
+ {
+ return RenderableUtility.BlendEquationType.Subtract;
+ }
+ case BlendEquation.ReverseSubtract:
+ {
+ return RenderableUtility.BlendEquationType.ReverseSubtract;
+ }
+ case BlendEquation.Multiply:
+ {
+ return RenderableUtility.BlendEquationType.Multiply;
+ }
+ case BlendEquation.Screen:
+ {
+ return RenderableUtility.BlendEquationType.Screen;
+ }
+ case BlendEquation.Overlay:
+ {
+ return RenderableUtility.BlendEquationType.Overlay;
+ }
+ case BlendEquation.Darken:
+ {
+ return RenderableUtility.BlendEquationType.Darken;
+ }
+ case BlendEquation.Lighten:
+ {
+ return RenderableUtility.BlendEquationType.Lighten;
+ }
+ case BlendEquation.ColorDodge:
+ {
+ return RenderableUtility.BlendEquationType.ColorDodge;
+ }
+ case BlendEquation.ColorBurn:
+ {
+ return RenderableUtility.BlendEquationType.ColorBurn;
+ }
+ case BlendEquation.HardLight:
+ {
+ return RenderableUtility.BlendEquationType.HardLight;
+ }
+ case BlendEquation.SoftLight:
+ {
+ return RenderableUtility.BlendEquationType.SoftLight;
+ }
+ case BlendEquation.Difference:
+ {
+ return RenderableUtility.BlendEquationType.Difference;
+ }
+ case BlendEquation.Exclusion:
+ {
+ return RenderableUtility.BlendEquationType.Exclusion;
+ }
+ case BlendEquation.Hue:
+ {
+ return RenderableUtility.BlendEquationType.Hue;
+ }
+ case BlendEquation.Saturation:
+ {
+ return RenderableUtility.BlendEquationType.Saturation;
+ }
+ case BlendEquation.Color:
+ {
+ return RenderableUtility.BlendEquationType.Color;
+ }
+ case BlendEquation.Luminosity:
+ {
+ return RenderableUtility.BlendEquationType.Luminosity;
+ }
+ }
+ return RenderableUtility.BlendEquationType.Add;
+ }
+
+ public static Tizen.NUI.BlendEquation ConvertBlendEquationTypeFromUtilityProperty(RenderableUtility.BlendEquationType blendEquationType)
+ {
+ switch (blendEquationType)
+ {
+ case RenderableUtility.BlendEquationType.Add:
+ {
+ return BlendEquation.Add;
+ }
+ case RenderableUtility.BlendEquationType.Min:
+ {
+ return BlendEquation.Min;
+ }
+ case RenderableUtility.BlendEquationType.Max:
+ {
+ return BlendEquation.Max;
+ }
+ case RenderableUtility.BlendEquationType.Subtract:
+ {
+ return BlendEquation.Subtract;
+ }
+ case RenderableUtility.BlendEquationType.ReverseSubtract:
+ {
+ return BlendEquation.ReverseSubtract;
+ }
+ case RenderableUtility.BlendEquationType.Multiply:
+ {
+ return BlendEquation.Multiply;
+ }
+ case RenderableUtility.BlendEquationType.Screen:
+ {
+ return BlendEquation.Screen;
+ }
+ case RenderableUtility.BlendEquationType.Overlay:
+ {
+ return BlendEquation.Overlay;
+ }
+ case RenderableUtility.BlendEquationType.Darken:
+ {
+ return BlendEquation.Darken;
+ }
+ case RenderableUtility.BlendEquationType.Lighten:
+ {
+ return BlendEquation.Lighten;
+ }
+ case RenderableUtility.BlendEquationType.ColorDodge:
+ {
+ return BlendEquation.ColorDodge;
+ }
+ case RenderableUtility.BlendEquationType.ColorBurn:
+ {
+ return BlendEquation.ColorBurn;
+ }
+ case RenderableUtility.BlendEquationType.HardLight:
+ {
+ return BlendEquation.HardLight;
+ }
+ case RenderableUtility.BlendEquationType.SoftLight:
+ {
+ return BlendEquation.SoftLight;
+ }
+ case RenderableUtility.BlendEquationType.Difference:
+ {
+ return BlendEquation.Difference;
+ }
+ case RenderableUtility.BlendEquationType.Exclusion:
+ {
+ return BlendEquation.Exclusion;
+ }
+ case RenderableUtility.BlendEquationType.Hue:
+ {
+ return BlendEquation.Hue;
+ }
+ case RenderableUtility.BlendEquationType.Saturation:
+ {
+ return BlendEquation.Saturation;
+ }
+ case RenderableUtility.BlendEquationType.Color:
+ {
+ return BlendEquation.Color;
+ }
+ case RenderableUtility.BlendEquationType.Luminosity:
+ {
+ return BlendEquation.Luminosity;
+ }
+ }
+ return BlendEquation.Add;
+ }
+
+ public enum BlendFactorType
+ {
+ /// <summary>
+ /// Match as GL_ZERO
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Zero = 0,
+
+ /// <summary>
+ /// Match as GL_ONE
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ One = 1,
+
+ /// <summary>
+ /// Match as GL_SRC_COLOR
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ SourceColor = 0x0300,
+
+ /// <summary>
+ /// Match as GL_ONE_MINUS_SRC_COLOR
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ OneMinusSourceColor = 0x0301,
+
+ /// <summary>
+ /// Match as GL_SRC_ALPHA
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ SourceAlpha = 0x0302,
+
+ /// <summary>
+ /// Match as GL_ONE_MINUS_SRC_ALPHA
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ OneMinusSourceAlpha = 0x0303,
+
+ /// <summary>
+ /// Match as GL_DST_ALPHA
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ DestinationAlpha = 0x0304,
+
+ /// <summary>
+ /// Match as GL_ONE_MINUS_DST_ALPHA
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ OneMinusDestinationAlpha = 0x0305,
+
+ /// <summary>
+ /// Match as GL_DST_COLOR
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ DestinationColor = 0x0306,
+
+ /// <summary>
+ /// Match as GL_ONE_MINUS_DST_COLOR
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ OneMinusDestinationColor = 0x0307,
+
+ /// <summary>
+ /// Match as GL_SRC_ALPHA_SATURATE
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ SourceAlphaSaturate = 0x0308,
+
+ /// <summary>
+ /// Match as GL_CONSTANT_COLOR
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ ConstantColor = 0x8001,
+
+ /// <summary>
+ /// Match as GL_ONE_MINUS_CONSTANT_COLOR
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ OneMinusConstantColor = 0x8002,
+
+ /// <summary>
+ /// Match as GL_CONSTANT_ALPHA
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ ConstantAlpha = 0x8003,
+
+ /// <summary>
+ /// Match as GL_ONE_MINUS_CONSTANT_ALPHA
+ /// </summary>
+ /// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ OneMinusConstantAlpha = 0x8004,
+ }
+
+ public static RenderableUtility.BlendFactorType ConvertBlendFactorTypeToUtilityProperty(Tizen.NUI.BlendFactor blendFactorType)
+ {
+ switch (blendFactorType)
+ {
+ case Tizen.NUI.BlendFactor.Zero:
+ {
+ return RenderableUtility.BlendFactorType.Zero;
+ }
+ case Tizen.NUI.BlendFactor.One:
+ {
+ return RenderableUtility.BlendFactorType.One;
+ }
+ case Tizen.NUI.BlendFactor.SourceColor:
+ {
+ return RenderableUtility.BlendFactorType.SourceColor;
+ }
+ case Tizen.NUI.BlendFactor.OneMinusSourceColor:
+ {
+ return RenderableUtility.BlendFactorType.OneMinusSourceColor;
+ }
+ case Tizen.NUI.BlendFactor.SourceAlpha:
+ {
+ return RenderableUtility.BlendFactorType.SourceAlpha;
+ }
+ case Tizen.NUI.BlendFactor.OneMinusSourceAlpha:
+ {
+ return RenderableUtility.BlendFactorType.OneMinusSourceAlpha;
+ }
+ case Tizen.NUI.BlendFactor.DestinationAlpha:
+ {
+ return RenderableUtility.BlendFactorType.DestinationAlpha;
+ }
+ case Tizen.NUI.BlendFactor.OneMinusDestinationAlpha:
+ {
+ return RenderableUtility.BlendFactorType.OneMinusDestinationAlpha;
+ }
+ case Tizen.NUI.BlendFactor.DestinationColor:
+ {
+ return RenderableUtility.BlendFactorType.DestinationColor;
+ }
+ case Tizen.NUI.BlendFactor.OneMinusDestinationColor:
+ {
+ return RenderableUtility.BlendFactorType.OneMinusDestinationColor;
+ }
+ case Tizen.NUI.BlendFactor.SourceAlphaSaturate:
+ {
+ return RenderableUtility.BlendFactorType.SourceAlphaSaturate;
+ }
+ case Tizen.NUI.BlendFactor.ConstantColor:
+ {
+ return RenderableUtility.BlendFactorType.ConstantColor;
+ }
+ case Tizen.NUI.BlendFactor.OneMinusConstantColor:
+ {
+ return RenderableUtility.BlendFactorType.OneMinusConstantColor;
+ }
+ case Tizen.NUI.BlendFactor.ConstantAlpha:
+ {
+ return RenderableUtility.BlendFactorType.ConstantAlpha;
+ }
+ case Tizen.NUI.BlendFactor.OneMinusConstantAlpha:
+ {
+ return RenderableUtility.BlendFactorType.OneMinusConstantAlpha;
+ }
+ }
+ return RenderableUtility.BlendFactorType.Zero;
+ }
+
+ public static BlendFactor ConvertBlendFactorTypeFromUtilityProperty(Tizen.NUI.RenderableUtility.BlendFactorType blendFactorType)
+ {
+ switch (blendFactorType)
+ {
+ case Tizen.NUI.RenderableUtility.BlendFactorType.Zero:
+ {
+ return BlendFactor.Zero;
+ }
+ case Tizen.NUI.RenderableUtility.BlendFactorType.One:
+ {
+ return BlendFactor.One;
+ }
+ case Tizen.NUI.RenderableUtility.BlendFactorType.SourceColor:
+ {
+ return BlendFactor.SourceColor;
+ }
+ case Tizen.NUI.RenderableUtility.BlendFactorType.OneMinusSourceColor:
+ {
+ return BlendFactor.OneMinusSourceColor;
+ }
+ case Tizen.NUI.RenderableUtility.BlendFactorType.SourceAlpha:
+ {
+ return BlendFactor.SourceAlpha;
+ }
+ case Tizen.NUI.RenderableUtility.BlendFactorType.OneMinusSourceAlpha:
+ {
+ return BlendFactor.OneMinusSourceAlpha;
+ }
+ case Tizen.NUI.RenderableUtility.BlendFactorType.DestinationAlpha:
+ {
+ return BlendFactor.DestinationAlpha;
+ }
+ case Tizen.NUI.RenderableUtility.BlendFactorType.OneMinusDestinationAlpha:
+ {
+ return BlendFactor.OneMinusDestinationAlpha;
+ }
+ case Tizen.NUI.RenderableUtility.BlendFactorType.DestinationColor:
+ {
+ return BlendFactor.DestinationColor;
+ }
+ case Tizen.NUI.RenderableUtility.BlendFactorType.OneMinusDestinationColor:
+ {
+ return BlendFactor.OneMinusDestinationColor;
+ }
+ case Tizen.NUI.RenderableUtility.BlendFactorType.SourceAlphaSaturate:
+ {
+ return BlendFactor.SourceAlphaSaturate;
+ }
+ case Tizen.NUI.RenderableUtility.BlendFactorType.ConstantColor:
+ {
+ return BlendFactor.ConstantColor;
+ }
+ case Tizen.NUI.RenderableUtility.BlendFactorType.OneMinusConstantColor:
+ {
+ return BlendFactor.OneMinusConstantColor;
+ }
+ case Tizen.NUI.RenderableUtility.BlendFactorType.ConstantAlpha:
+ {
+ return BlendFactor.ConstantAlpha;
+ }
+ case Tizen.NUI.RenderableUtility.BlendFactorType.OneMinusConstantAlpha:
+ {
+ return BlendFactor.OneMinusConstantAlpha;
+ }
+ }
+ return BlendFactor.Zero;
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright(c) 2024 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System;
+using System.ComponentModel;
+
+namespace Tizen.NUI
+{
+ /// <summary>
+ /// Enumeration for instances of properties belonging to the Renderer class.
+ /// </summary>
+ internal class RendererProperty
+ {
+ internal static readonly int DepthIndex = Interop.Renderer.DepthIndexGet();
+ internal static readonly int FaceCullingMode = Interop.Renderer.FaceCullingModeGet();
+ internal static readonly int BlendMode = Interop.Renderer.BlendModeGet();
+ internal static readonly int BlendEquationRgb = Interop.Renderer.BlendEquationRgbGet();
+ internal static readonly int BlendEquationAlpha = Interop.Renderer.BlendEquationAlphaGet();
+ internal static readonly int BlendFactorSrcRgb = Interop.Renderer.BlendFactorSrcRgbGet();
+ internal static readonly int BlendFactorDestRgb = Interop.Renderer.BlendFactorDestRgbGet();
+ internal static readonly int BlendFactorSrcAlpha = Interop.Renderer.BlendFactorSrcAlphaGet();
+ internal static readonly int BlendFactorDestAlpha = Interop.Renderer.BlendFactorDestAlphaGet();
+ internal static readonly int BlendColor = Interop.Renderer.BlendColorGet();
+ internal static readonly int BlendPreMultipliedAlpha = Interop.Renderer.BlendPreMultipliedAlphaGet();
+ internal static readonly int IndexRangeFirst = Interop.Renderer.IndexRangeFirstGet();
+ internal static readonly int IndexRangeCount = Interop.Renderer.IndexRangeCountGet();
+ internal static readonly int DepthWriteMode = Interop.Renderer.DepthWriteModeGet();
+ internal static readonly int DepthFunction = Interop.Renderer.DepthFunctionGet();
+ internal static readonly int DepthTestMode = Interop.Renderer.DepthTestModeGet();
+ internal static readonly int RenderMode = Interop.Renderer.RenderModeGet();
+ internal static readonly int StencilFunction = Interop.Renderer.StencilFunctionGet();
+ internal static readonly int StencilFunctionMask = Interop.Renderer.StencilFunctionMaskGet();
+ internal static readonly int StencilFunctionReference = Interop.Renderer.StencilFunctionReferenceGet();
+ internal static readonly int StencilMask = Interop.Renderer.StencilMaskGet();
+ internal static readonly int StencilOperationOnFail = Interop.Renderer.StencilOperationOnFailGet();
+ internal static readonly int StencilOperationOnZFail = Interop.Renderer.StencilOperationOnZFailGet();
+ internal static readonly int StencilOperationOnZPass = Interop.Renderer.StencilOperationOnZPassGet();
+ }
+}
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright(c) 2024 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System;
+using System.ComponentModel;
+
+namespace Tizen.NUI
+{
+ /// <summary>
+ /// FadeTransitionItem is an object to set Fade transition of a View that will appear or disappear.
+ /// FadeTransitionItem object is required to be added to the TransitionSet to play.
+ /// </summary>
+ internal class SamplerUtility
+ {
+ public enum PresetFilter
+ {
+ None = 0,
+ Default,
+ Nearest,
+ Linear,
+ NearestMipmapNearest,
+ LinearMipmapNearest,
+ NearestMipmapLinear,
+ LinearMipmapLinear
+ }
+
+ public static PresetFilter GetPresetFilter(SamplerFilter samplerFilter, MipmapFilter mipmapFilter = MipmapFilter.None)
+ {
+ if(samplerFilter == SamplerFilter.Nearest)
+ {
+ switch(mipmapFilter)
+ {
+ case MipmapFilter.None:
+ {
+ return PresetFilter.Nearest;
+ }
+ case MipmapFilter.Nearest:
+ {
+ return PresetFilter.NearestMipmapNearest;
+ }
+ case MipmapFilter.Linear:
+ {
+ return PresetFilter.NearestMipmapLinear;
+ }
+ }
+ }
+ else if(samplerFilter == SamplerFilter.Linear)
+ {
+ switch(mipmapFilter)
+ {
+ case MipmapFilter.None:
+ {
+ return PresetFilter.Linear;
+ }
+ case MipmapFilter.Nearest:
+ {
+ return PresetFilter.LinearMipmapNearest;
+ }
+ case MipmapFilter.Linear:
+ {
+ return PresetFilter.LinearMipmapLinear;
+ }
+ }
+ }
+ return PresetFilter.None;
+ }
+ }
+}
/// <summary>
/// Gets the number of renderers held by the view.
/// </summary>
- /// <since_tizen> 3 </since_tizen>
- public uint RendererCount
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public uint RenderableCount
{
get
{
}
/// <summary>
- /// Adds a renderer to the view.
+ /// Adds a renderable to the view.
/// </summary>
- /// <param name="renderer">The renderer to add.</param>
- /// <returns>The index of the Renderer that was added to the view.</returns>
- /// <since_tizen> 3 </since_tizen>
- public uint AddRenderer(Renderer renderer)
+ /// <param name="renderable">The renderable to add.</param>
+ /// <returns>The index of the Renderable that was added to the view.</returns>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public uint AddRenderable(Renderable renderable)
{
- uint ret = Interop.Actor.AddRenderer(SwigCPtr, Renderer.getCPtr(renderer));
+ uint ret = Interop.Actor.AddRenderer(SwigCPtr, Renderable.getCPtr(renderable));
if (NDalicPINVOKE.SWIGPendingException.Pending)
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
/// <summary>
- /// Retrieves the renderer at the specified index.
+ /// Retrieves the renderable at the specified index.
/// </summary>
- /// <param name="index">The index of the renderer to retrieve.</param>
- /// <returns>A Renderer object at the specified index.</returns>
+ /// <param name="index">The index of the renderable to retrieve.</param>
+ /// <returns>A Renderable object at the specified index.</returns>
/// <remarks>
- /// The index must be between 0 and GetRendererCount()-1
+ /// The index must be between 0 and GetRenderableCount()-1
/// </remarks>
- /// <since_tizen> 3 </since_tizen>
- public Renderer GetRendererAt(uint index)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Renderable GetRenderableAt(uint index)
{
IntPtr cPtr = Interop.Actor.GetRendererAt(SwigCPtr, index);
- Renderer ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Renderer;
+ Renderable ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Renderable;
if (ret != null)
{
Interop.BaseHandle.DeleteBaseHandle(new HandleRef(this, cPtr));
}
else
{
- ret = new Renderer(cPtr, true);
+ ret = new Renderable(cPtr, true);
}
NDalicPINVOKE.ThrowExceptionIfExists();
return ret;
}
/// <summary>
- /// Removes the specified renderer from the view.
+ /// Removes the specified renderable from the view.
/// </summary>
- /// <param name="renderer">The renderer to remove.</param>
- /// <since_tizen> 3 </since_tizen>
- public void RemoveRenderer(Renderer renderer)
+ /// <param name="renderable">The renderable to remove.</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void RemoveRenderable(Renderable renderable)
{
- Interop.Actor.RemoveRenderer(SwigCPtr, Renderer.getCPtr(renderer));
+ Interop.Actor.RemoveRenderer(SwigCPtr, Renderable.getCPtr(renderable));
if (NDalicPINVOKE.SWIGPendingException.Pending)
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
/// <summary>
- /// Removes a renderer at the specified index from the view.
+ /// Removes a renderable at the specified index from the view.
/// </summary>
- /// <param name="index">The index of the renderer to remove.</param>
- /// <since_tizen> 3 </since_tizen>
- public void RemoveRenderer(uint index)
+ /// <param name="index">The index of the renderable to remove.</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void RemoveRenderable(uint index)
{
Interop.Actor.RemoveRenderer(SwigCPtr, index);
if (NDalicPINVOKE.SWIGPendingException.Pending)
--- /dev/null
+// Copyright (c) 2025 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+using System;
+using System.ComponentModel;
+using System.Diagnostics.CodeAnalysis;
+
+namespace Tizen.NUI
+{
+ /// <summary>
+ /// DepthIndex is used to define order of Renderable in a View
+ /// A Renderable has larger number of DepthIndex will be rendered after than those have small number of DepthIndex.
+ /// </summary>
+ /// This will be opened API after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public sealed class DepthIndexRanges
+ {
+ /// <summary>
+ /// If DepthIndex of a Renderable is set below the BackgroundEffect,
+ /// The Renderable is rendered before the shadow of the View.
+ /// </summary>
+ /// This will be opened API after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly int BackgroundEffect = Interop.Renderer.RangesBackgroundEffectGet();
+
+ /// <summary>
+ /// If DepthIndex of a Renderable is between BackgroundEffect and Background
+ /// The Renderable is rendered after shadow and before background of the View.
+ /// </summary>
+ /// This will be opened API after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly int Background = Interop.Renderer.RangesBackgroundGet();
+
+ /// <summary>
+ /// If DepthIndex of a Renderable is between Background and Content
+ /// The Renderable is rendered after background and before content of the View.
+ /// For example, the Content of ImageView is image.
+ /// </summary>
+ /// This will be opened API after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly int Content = Interop.Renderer.RangesContentGet();
+
+ /// <summary>
+ /// If DepthIndex of a Renderable is between Content and Decoration
+ /// </summary>
+ /// This will be opened API after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly int Decoration = Interop.Renderer.RangesDecorationGet();
+
+ /// <summary>
+ /// If DepthIndex of a Renderable is between Content and Decoration
+ /// </summary>
+ /// This will be opened API after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly int ForegroundEffect = Interop.Renderer.RangesForegroundEffectGet();
+
+ // TODO: Min, max
+ // TODO: Needs Decoration and ForegroundEffect? more accuratly.
+ }
+}
\ No newline at end of file
+++ /dev/null
-/*
- * Copyright(c) 2017 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-namespace Tizen.NUI
-{
- /// <summary>
- /// Enumeration of the type of possible filter modes.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- public enum FilterModeType
- {
- /// <summary>
- /// Use GL defaults (minification NEAREST_MIPMAP_LINEAR, magnification LINEAR).
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- NONE = 0,
- /// <summary>
- /// Use Dali defaults (minification LINEAR, magnification LINEAR).
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- DEFAULT,
- /// <summary>
- /// Filter nearest.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- NEAREST,
- /// <summary>
- /// Filter linear.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- LINEAR,
- /// <summary>
- /// Filter nearest mipmap nearest.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- NEAREST_MIPMAP_NEAREST,
- /// <summary>
- /// Filter linear mipmap nearest.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- LINEAR_MIPMAP_NEAREST,
- /// <summary>
- /// Filter nearest mipmap linear.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- NEAREST_MIPMAP_LINEAR,
- /// <summary>
- /// Filter linear mipmap linear.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- LINEAR_MIPMAP_LINEAR
- }
-}
/*
- * Copyright(c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
{
/// <summary>
/// Geometry is handle to an object that can be used to define a geometric elements.
+ /// The geometry is defined by VertexBuffer and IndexBuffer.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- public class Geometry : BaseHandle
+ public partial class Geometry : BaseHandle
{
/// <summary>
/// Create an instance of Geometry.
{
}
- /// <summary>
- /// Enumeration for the description of the type of geometry,
- /// used to determine how the coordinates will be used.
+ /// <summary>,
+ /// Sets and gets PrimitiveType
/// </summary>
- /// <returns>Type of primitives this geometry contains.</returns>
- /// <since_tizen> 3 </since_tizen>
- public enum Type
- {
- /// <summary>
- /// Individual points.
- /// </summary>
- POINTS,
-
- /// <summary>
- /// Individual lines (made of 2 points each).
- /// </summary>
- LINES,
-
- /// <summary>
- /// A strip of lines (made of 1 point each) which also joins the first and last point.
- /// </summary>
- LINE_LOOP,
-
- /// <summary>
- /// A strip of lines (made of 1 point each).
- /// </summary>
- LINE_STRIP,
-
- /// <summary>
- /// Individual triangles (made of 3 points each).
- /// </summary>
- TRIANGLES,
-
- /// <summary>
- /// A fan of triangles around a centre point (after the first triangle, following triangles need only 1 point).
- /// </summary>
- TRIANGLE_FAN,
-
- /// <summary>
- /// A strip of triangles (after the first triangle, following triangles need only 1 point).
- /// </summary>
- TRIANGLE_STRIP
- }
-
- /// <summary>
- /// Adds a PropertyBuffer to be used as source of geometry vertices.
- /// </summary>
- /// <param name="vertexBuffer">PropertyBuffer to be used as source of geometry vertices.</param>
- /// <returns>Index of the newly added buffer.</returns>
- /// <since_tizen> 3 </since_tizen>
- public uint AddVertexBuffer(PropertyBuffer vertexBuffer)
+ /// <remarks>
+ /// The PremitiveType should be matched with Vertex and Index Buffer.
+ /// </remarks>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public PrimitiveType PrimitiveType
{
- uint ret = Interop.Geometry.AddVertexBuffer(SwigCPtr, PropertyBuffer.getCPtr(vertexBuffer));
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
+ get
+ {
+ return GetPrimitiveType();
+ }
+ set
+ {
+ SetPrimitiveType(value);
+ }
}
/// <summary>
/// <summary>
/// Sets the type of primitives this geometry contains.
/// </summary>
- /// <param name="geometryType">Array of indices.</param>
- /// <since_tizen> 3 </since_tizen>
- public void SetType(Geometry.Type geometryType)
+ /// <param name="primitiveType">Array of indices.</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ private void SetPrimitiveType(PrimitiveType primitiveType)
{
- Interop.Geometry.SetType(SwigCPtr, (int)geometryType);
+ Interop.Geometry.SetType(SwigCPtr, (int)primitiveType);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
/// Gets the type of primitives this geometry contains.
/// </summary>
/// <returns>Type of primitives this geometry contains.</returns>
- /// <since_tizen> 3 </since_tizen>
- public new Geometry.Type GetType()
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ private PrimitiveType GetPrimitiveType()
{
- Geometry.Type ret = (Geometry.Type)Interop.Geometry.GetType(SwigCPtr);
+ PrimitiveType ret = (PrimitiveType)Interop.Geometry.GetType(SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
--- /dev/null
+// Copyright (c) 2025 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+using System.ComponentModel;
+
+namespace Tizen.NUI
+{
+ /// <summary>
+ /// Specifies the mipmap filtering metho
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public enum MipmapFilter
+ {
+ /// <summary>
+ /// No mipmap usage
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ None,
+
+ /// <summary>
+ /// Uses the nearest mipmap level
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Nearest,
+
+ /// <summary>
+ /// Uses liniear interpolation between mipmap levels
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Linear
+ }
+}
\ No newline at end of file
--- /dev/null
+// Copyright (c) 2025 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+using System.ComponentModel;
+
+namespace Tizen.NUI
+{
+ /// <summary>
+ /// Enumeration for the description of the type of primitive mesh,
+ /// used to determine how the coordinates will be used.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public enum PrimitiveType
+ {
+ /// <summary>
+ /// Individual points.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Points,
+
+ /// <summary>
+ /// Individual lines (made of 2 points each).
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Lines,
+
+ /// <summary>
+ /// A strip of lines (made of 1 point each) which also joins the first and last point.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ LineLoop,
+
+ /// <summary>
+ /// A strip of lines (made of 1 point each).
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ LineStrip,
+
+ /// <summary>
+ /// Individual triangles (made of 3 points each).
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ Triangles,
+
+ /// <summary>
+ /// A fan of triangles around a centre point (after the first triangle, following triangles need only 1 point).
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ TriangleFan,
+
+ /// <summary>
+ /// A strip of triangles (after the first triangle, following triangles need only 1 point).
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ TriangleStrip
+ }
+}
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+using System;
+using System.ComponentModel;
+using System.Diagnostics.CodeAnalysis;
+using System.Runtime.InteropServices;
+
+namespace Tizen.NUI
+{
+ /// <summary>
+ /// Renderable is a handle to an object used to show content by combining a Geometry, a TextureSet and a shader.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public partial class Renderable : Animatable
+ {
+ private Geometry geometry = null;
+ private Shader shader = null;
+
+ /// <summary>
+ /// Create an instance of Renderable without Geometry or Shader.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Renderable() : this(Interop.Renderer.New(), true)
+ {
+ NDalicPINVOKE.ThrowExceptionIfExists();
+ }
+
+ /// <summary>
+ /// Gets and Sets DepthIndex property.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public int DepthIndex
+ {
+ get
+ {
+ int temp = 0;
+ Tizen.NUI.PropertyValue pValue = Tizen.NUI.Object.GetProperty(SwigCPtr, RendererProperty.DepthIndex);
+ pValue.Get(out temp);
+ pValue.Dispose();
+ return temp;
+ }
+ set
+ {
+ var temp = new Tizen.NUI.PropertyValue(value);
+ Tizen.NUI.Object.SetProperty(SwigCPtr, RendererProperty.DepthIndex, temp);
+ temp.Dispose();
+ }
+ }
+
+ /// <summary>
+ /// Gets and Sets FaceCullingMode to define which face is culled or not.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public FaceCullingMode FaceCullingMode
+ {
+ get => (FaceCullingMode)Object.InternalGetPropertyInt(SwigCPtr, RendererProperty.FaceCullingMode);
+ set => Object.InternalSetPropertyInt(SwigCPtr, RendererProperty.FaceCullingMode, (int)value);
+ }
+
+ /// <summary>
+ /// Gets and Sets BlendMode.
+ /// BlendMode defines how source and destination colors are blended.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public BlendMode BlendMode
+ {
+ get => (BlendMode)Object.InternalGetPropertyInt(SwigCPtr, RendererProperty.BlendMode);
+ set => Object.InternalSetPropertyInt(SwigCPtr, RendererProperty.BlendMode, (int)value);
+ }
+
+ /// <summary>
+ /// Gets and Sets BlendEquation method for RGB channel.
+ /// BlendEquation specifies the mathematical operation for blending.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public BlendEquation BlendEquationRgb
+ {
+ get => RenderableUtility.ConvertBlendEquationTypeFromUtilityProperty((RenderableUtility.BlendEquationType)Object.InternalGetPropertyInt(SwigCPtr, RendererProperty.BlendEquationRgb));
+ set => Object.InternalSetPropertyInt(SwigCPtr, RendererProperty.BlendEquationRgb, (int)RenderableUtility.ConvertBlendEquationTypeToUtilityProperty(value));
+ }
+
+ /// <summary>
+ /// Gets and Sets BlendEquation method for Alpha channel.
+ /// BlendEquation specifies the mathematical operation for blending.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public BlendEquation BlendEquationAlpha
+ {
+ get => RenderableUtility.ConvertBlendEquationTypeFromUtilityProperty((RenderableUtility.BlendEquationType)Object.InternalGetPropertyInt(SwigCPtr, RendererProperty.BlendEquationAlpha));
+ set => Object.InternalSetPropertyInt(SwigCPtr, RendererProperty.BlendEquationAlpha, (int)RenderableUtility.ConvertBlendEquationTypeToUtilityProperty(value));
+ }
+
+ /// <summary>
+ /// Gets and Sets BlendFactor for Rgb channel of Source.
+ /// BlendFactor determines the weight of source and destination colors.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public BlendFactor BlendFactorSrcRgb
+ {
+ get => RenderableUtility.ConvertBlendFactorTypeFromUtilityProperty((RenderableUtility.BlendFactorType)Object.InternalGetPropertyInt(SwigCPtr, RendererProperty.BlendFactorSrcRgb));
+ set => Object.InternalSetPropertyInt(SwigCPtr, RendererProperty.BlendFactorSrcRgb, (int)RenderableUtility.ConvertBlendFactorTypeToUtilityProperty(value));
+ }
+
+ /// <summary>
+ /// Gets and Sets BlendFactor for Rgb channel of Destination.
+ /// BlendFactor determines the weight of source and destination colors.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public BlendFactor BlendFactorDestRgb
+ {
+ get => RenderableUtility.ConvertBlendFactorTypeFromUtilityProperty((RenderableUtility.BlendFactorType)Object.InternalGetPropertyInt(SwigCPtr, RendererProperty.BlendFactorDestRgb));
+ set => Object.InternalSetPropertyInt(SwigCPtr, RendererProperty.BlendFactorDestRgb, (int)RenderableUtility.ConvertBlendFactorTypeToUtilityProperty(value));
+ }
+
+ /// <summary>
+ /// Gets and Sets BlendFactor for Alpha channel of Source.
+ /// BlendFactor determines the weight of source and destination colors.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public BlendFactor BlendFactorSrcAlpha
+ {
+ get => RenderableUtility.ConvertBlendFactorTypeFromUtilityProperty((RenderableUtility.BlendFactorType)Object.InternalGetPropertyInt(SwigCPtr, RendererProperty.BlendFactorSrcAlpha));
+ set => Object.InternalSetPropertyInt(SwigCPtr, RendererProperty.BlendFactorSrcAlpha, (int)RenderableUtility.ConvertBlendFactorTypeToUtilityProperty(value));
+ }
+
+ /// <summary>
+ /// Gets and Sets BlendFactor for Alpha channel of Destination.
+ /// BlendFactor determines the weight of source and destination colors.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public BlendFactor BlendFactorDestAlpha
+ {
+ get => RenderableUtility.ConvertBlendFactorTypeFromUtilityProperty((RenderableUtility.BlendFactorType)Object.InternalGetPropertyInt(SwigCPtr, RendererProperty.BlendFactorDestAlpha));
+ set => Object.InternalSetPropertyInt(SwigCPtr, RendererProperty.BlendFactorDestAlpha, (int)RenderableUtility.ConvertBlendFactorTypeToUtilityProperty(value));
+ }
+
+ /// <summary>
+ /// Gets and Sets BlendColor.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Vector4 BlendColor
+ {
+ get
+ {
+ Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
+ var pValue = Tizen.NUI.Object.GetProperty(SwigCPtr, RendererProperty.BlendColor);
+ pValue.Get(temp);
+ pValue.Dispose();
+ return temp;
+ }
+ set
+ {
+ var temp = new Tizen.NUI.PropertyValue(value);
+ Tizen.NUI.Object.SetProperty(SwigCPtr, RendererProperty.BlendColor, temp);
+ temp.Dispose();
+ }
+ }
+
+ /// <summary>
+ /// Gets and Sets BlendPreMultipliedAlpha.
+ /// If it is true, it denotes the RGB color values are aleady multiplied by the alpha value.
+ /// It improves blending accuracy and avoidng artifacts in transparent areas.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool BlendPreMultipliedAlpha
+ {
+ get
+ {
+ bool temp = false;
+ var pValue = Tizen.NUI.Object.GetProperty(SwigCPtr, RendererProperty.BlendPreMultipliedAlpha);
+ pValue.Get(out temp);
+ pValue.Dispose();
+ return temp;
+ }
+ set
+ {
+ var temp = new Tizen.NUI.PropertyValue(value);
+ Tizen.NUI.Object.SetProperty(SwigCPtr, RendererProperty.BlendPreMultipliedAlpha, temp);
+ temp.Dispose();
+ }
+ }
+
+ /// <summary>
+ /// Gets and Sets first index to define effective range of indices to draw from bound index buffer.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public int FirstIndex
+ {
+ get
+ {
+ int temp = 0;
+ var pValue = Tizen.NUI.Object.GetProperty(SwigCPtr, RendererProperty.IndexRangeFirst);
+ pValue.Get(out temp);
+ pValue.Dispose();
+ return temp;
+ }
+ set
+ {
+ var temp = new Tizen.NUI.PropertyValue(value);
+ Tizen.NUI.Object.SetProperty(SwigCPtr, RendererProperty.IndexRangeFirst, temp);
+ temp.Dispose();
+ }
+ }
+
+ /// <summary>
+ /// Gets and Sets index count of effective range of indices to draw from bound index buffer.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public int IndexCount
+ {
+ get
+ {
+ int temp = 0;
+ var pValue = Tizen.NUI.Object.GetProperty(SwigCPtr, RendererProperty.IndexRangeCount);
+ pValue.Get(out temp);
+ pValue.Dispose();
+ return temp;
+ }
+ set
+ {
+ var temp = new Tizen.NUI.PropertyValue(value);
+ Tizen.NUI.Object.SetProperty(SwigCPtr, RendererProperty.IndexRangeCount, temp);
+ temp.Dispose();
+ }
+ }
+
+ /// <summary>
+ /// Gets and Sets DepthWriteMode.
+ /// This property controls wheter depth buffer writing is enabled.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public DepthWriteMode DepthWriteMode
+ {
+ get => (DepthWriteMode)Object.InternalGetPropertyInt(SwigCPtr, RendererProperty.DepthWriteMode);
+ set => Object.InternalSetPropertyInt(SwigCPtr, RendererProperty.DepthWriteMode, (int)value);
+ }
+
+ /// <summary>
+ /// Gets and Sets DepthFunction.
+ /// This property defines the comparison function for depth testing
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public DepthFunction DepthFunction
+ {
+ get => (DepthFunction)Object.InternalGetPropertyInt(SwigCPtr, RendererProperty.DepthFunction);
+ set => Object.InternalSetPropertyInt(SwigCPtr, RendererProperty.DepthFunction, (int)value);
+ }
+
+ /// <summary>
+ /// Gets and Sets DepthTestMode.
+ /// This property specifies how depth testing is applied to fragments.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public DepthTestMode DepthTestMode
+ {
+ get => (DepthTestMode)Object.InternalGetPropertyInt(SwigCPtr, RendererProperty.DepthTestMode);
+ set => Object.InternalSetPropertyInt(SwigCPtr, RendererProperty.DepthTestMode, (int)value);
+ }
+
+ /// <summary>
+ /// Gets and Sets RenderMode.
+ /// This property specifies what aspects of rendering are enabled.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public RenderMode RenderMode
+ {
+ get => (RenderMode)Object.InternalGetPropertyInt(SwigCPtr, RendererProperty.RenderMode);
+ set => Object.InternalSetPropertyInt(SwigCPtr, RendererProperty.RenderMode, (int)value);
+ }
+
+ /// <summary>
+ /// Gets and Sets Stencil Function.
+ /// This property specifies the test function for stencil buffering
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public StencilFunction StencilFunction
+ {
+ get => (StencilFunction)Object.InternalGetPropertyInt(SwigCPtr, RendererProperty.StencilFunction);
+ set => Object.InternalSetPropertyInt(SwigCPtr, RendererProperty.StencilFunction, (int)value);
+ }
+
+ /// <summary>
+ /// Gets and Sets StencilFunctionMask.
+ /// A bitmask applied to the stencil test function
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public int StencilFunctionMask
+ {
+ get
+ {
+ int temp = 0;
+ var pValue = Tizen.NUI.Object.GetProperty(SwigCPtr, RendererProperty.StencilFunctionMask);
+ pValue.Get(out temp);
+ pValue.Dispose();
+ return temp;
+ }
+ set
+ {
+ var temp = new Tizen.NUI.PropertyValue(value);
+ Tizen.NUI.Object.SetProperty(SwigCPtr, RendererProperty.StencilFunctionMask, temp);
+ temp.Dispose();
+ }
+ }
+
+ /// <summary>
+ /// Gets and Sets StencilFunctionReference.
+ /// The reference value used in the stencil test.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public int StencilFunctionReference
+ {
+ get
+ {
+ int temp = 0;
+ var pValue = Tizen.NUI.Object.GetProperty(SwigCPtr, RendererProperty.StencilFunctionReference);
+ pValue.Get(out temp);
+ pValue.Dispose();
+ return temp;
+ }
+ set
+ {
+ var temp = new Tizen.NUI.PropertyValue(value);
+ Tizen.NUI.Object.SetProperty(SwigCPtr, RendererProperty.StencilFunctionReference, temp);
+ temp.Dispose();
+ }
+ }
+
+ /// <summary>
+ /// Gets and Sets StencilMask.
+ /// This property controls which bits of the stencil buffer can be modified.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public int StencilMask
+ {
+ get
+ {
+ int temp = 0;
+ var pValue = Tizen.NUI.Object.GetProperty(SwigCPtr, RendererProperty.StencilMask);
+ pValue.Get(out temp);
+ pValue.Dispose();
+ return temp;
+ }
+ set
+ {
+ var temp = new Tizen.NUI.PropertyValue(value);
+ Tizen.NUI.Object.SetProperty(SwigCPtr, RendererProperty.StencilMask, temp);
+ temp.Dispose();
+ }
+ }
+
+ /// <summary>
+ /// Gets and Sets StencilOperationOnFail.
+ /// Action when the stencil test fails.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public StencilOperation StencilOperationOnFail
+ {
+ get => (StencilOperation)Object.InternalGetPropertyInt(SwigCPtr, RendererProperty.StencilOperationOnFail);
+ set => Object.InternalSetPropertyInt(SwigCPtr, RendererProperty.StencilOperationOnFail, (int)value);
+ }
+
+ /// <summary>
+ /// Gets and Sets StencilOperationOnZFail.
+ /// Action when the depth test fails but the stencil test passed.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public StencilOperation StencilOperationOnZFail
+ {
+ get => (StencilOperation)Object.InternalGetPropertyInt(SwigCPtr, RendererProperty.StencilOperationOnZFail);
+ set => Object.InternalSetPropertyInt(SwigCPtr, RendererProperty.StencilOperationOnZFail, (int)value);
+ }
+
+ /// <summary>
+ /// Gets and Sets StencilOperationOnZPass property.
+ /// Action when both stencil and depth tests pass.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public StencilOperation StencilOperationOnZPass
+ {
+ get => (StencilOperation)Object.InternalGetPropertyInt(SwigCPtr, RendererProperty.StencilOperationOnZPass);
+ set => Object.InternalSetPropertyInt(SwigCPtr, RendererProperty.StencilOperationOnZPass, (int)value);
+ }
+
+ /// <summary>
+ /// Gets and Sets Geometry of this Renderable.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Geometry Geometry
+ {
+ get => geometry;
+ set => SetGeometry(value);
+ }
+
+ /// <summary>
+ /// Gets and Sets Shader of this Renderable.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Shader Shader
+ {
+ get => shader;
+ set => SetShader(value);
+ }
+
+ /// <summary>
+ /// Gets and Sets Textures of this Renderable.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public TextureSet TextureSet
+ {
+ get => GetTextures();
+ set => SetTextures(value);
+ }
+
+ /// <summary>
+ /// Sets the geometry to be used by this renderer.
+ /// </summary>
+ /// <param name="geometry">The geometry to be used by this renderer.</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ private void SetGeometry(Geometry geometry)
+ {
+ this.geometry = geometry;
+ Interop.Renderer.SetGeometry(SwigCPtr, Geometry.getCPtr(this.geometry));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// Sets the shader used by this renderer.
+ /// </summary>
+ /// <param name="shader">The shader to be used by this renderer.</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ private void SetShader(Shader shader)
+ {
+ this.shader = shader;
+ Interop.Renderer.SetShader(SwigCPtr, Shader.getCPtr(this.shader));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// Sets the texture set to be used by this renderer.
+ /// </summary>
+ /// <param name="textureSet">The texture set to be used by this renderer.</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ private void SetTextures(TextureSet textureSet)
+ {
+ Interop.Renderer.SetTextures(SwigCPtr, TextureSet.getCPtr(textureSet));
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ /// <summary>
+ /// Gets the texture set used by this renderer.
+ /// </summary>
+ /// <returns>The texture set used by the renderer.</returns>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ private TextureSet GetTextures()
+ {
+ global::System.IntPtr cPtr = Interop.Renderer.GetTextures(SwigCPtr);
+ TextureSet ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as TextureSet;
+ if (ret != null)
+ {
+ Interop.BaseHandle.DeleteBaseHandle(new global::System.Runtime.InteropServices.HandleRef(this, cPtr));
+ }
+ else
+ {
+ ret = new TextureSet(cPtr, true);
+ }
+ NDalicPINVOKE.ThrowExceptionIfExists();
+ return ret;
+ }
+
+ internal Renderable(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
+ {
+ }
+
+ /// This will not be public opened.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
+ {
+ Interop.Renderer.DeleteRenderer(swigCPtr);
+ }
+ }
+}
+++ /dev/null
-/*
- * Copyright(c) 2021 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-using System;
-using System.ComponentModel;
-using System.Diagnostics.CodeAnalysis;
-using System.Runtime.InteropServices;
-
-namespace Tizen.NUI
-{
- /// <summary>
- /// Renderer is a handle to an object used to show content by combining a Geometry, a TextureSet and a shader.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- public class Renderer : Animatable
- {
- private Geometry CurrentGeometry = null;
- private Shader CurrentShader = null;
-
- /// <summary>
- /// Create an instance of Renderer.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- public Renderer(Geometry geometry, Shader shader) : this(Interop.Renderer.New(Geometry.getCPtr(geometry), Shader.getCPtr(shader)), true)
- {
- CurrentGeometry = geometry;
- CurrentShader = shader;
-
- NDalicPINVOKE.ThrowExceptionIfExists();
- }
-
- /// <summary>
- /// Create an instance of Renderer without Geometry or Shader.
- /// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
- public Renderer() : this(Interop.Renderer.New(), true)
- {
- NDalicPINVOKE.ThrowExceptionIfExists();
- }
-
- /// <summary>
- /// Gets and Sets DepthIndex property.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- public int DepthIndex
- {
- get
- {
- int temp = 0;
- Tizen.NUI.PropertyValue pValue = Tizen.NUI.Object.GetProperty(SwigCPtr, Renderer.Property.DepthIndex);
- pValue.Get(out temp);
- pValue.Dispose();
- return temp;
- }
- set
- {
- var temp = new Tizen.NUI.PropertyValue(value);
- Tizen.NUI.Object.SetProperty(SwigCPtr, Renderer.Property.DepthIndex, temp);
- temp.Dispose();
- }
- }
-
- /// <summary>
- /// Gets and Sets FaceCullingMode.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- public int FaceCullingMode
- {
- get
- {
- return (int)InternalFaceCullingMode;
- }
- set
- {
- InternalFaceCullingMode = (FaceCullingModeType)value;
- }
- }
-
- /// <summary>
- /// Gets and Sets FaceCullingMode by FaceCullingModeType enum.
- /// </summary>
- private FaceCullingModeType InternalFaceCullingMode
- {
- get
- {
- return (FaceCullingModeType)Object.InternalGetPropertyInt(SwigCPtr, Renderer.Property.FaceCullingMode);
- }
- set
- {
- Object.InternalSetPropertyInt(SwigCPtr, Renderer.Property.FaceCullingMode, (int)value);
- }
- }
-
- /// <summary>
- /// Gets and Sets BlendMode.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- public int BlendMode
- {
- get
- {
- return (int)InternalBlendMode;
- }
- set
- {
- InternalBlendMode = (BlendModeType)value;
- }
- }
-
- /// <summary>
- /// Gets and Sets BlendMode by BlendModeType enum.
- /// </summary>
- private BlendModeType InternalBlendMode
- {
- get
- {
- return (BlendModeType)Object.InternalGetPropertyInt(SwigCPtr, Renderer.Property.BlendMode);
- }
- set
- {
- Object.InternalSetPropertyInt(SwigCPtr, Renderer.Property.BlendMode, (int)value);
- }
- }
-
- /// <summary>
- /// Gets and Sets BlendEquationRgb.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- public int BlendEquationRgb
- {
- get
- {
- return (int)InternalBlendEquationRgb;
- }
- set
- {
- InternalBlendEquationRgb = (BlendEquationType)value;
- }
- }
-
- /// <summary>
- /// Gets and Sets BlendEquationRgb by BlendEquationType enum.
- /// </summary>
- private BlendEquationType InternalBlendEquationRgb
- {
- get
- {
- return (BlendEquationType)Object.InternalGetPropertyInt(SwigCPtr, Renderer.Property.BlendEquationRgb);
- }
- set
- {
- Object.InternalSetPropertyInt(SwigCPtr, Renderer.Property.BlendEquationRgb, (int)value);
- }
- }
-
- /// <summary>
- /// Gets and Sets BlendEquationAlpha.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- public int BlendEquationAlpha
- {
- get
- {
- return (int)InternalBlendEquationAlpha;
- }
- set
- {
- InternalBlendEquationAlpha = (BlendEquationType)value;
- }
- }
-
- /// <summary>
- /// Gets and Sets BlendEquationRgb by BlendEquationType enum.
- /// </summary>
- private BlendEquationType InternalBlendEquationAlpha
- {
- get
- {
- return (BlendEquationType)Object.InternalGetPropertyInt(SwigCPtr, Renderer.Property.BlendEquationAlpha);
- }
- set
- {
- Object.InternalSetPropertyInt(SwigCPtr, Renderer.Property.BlendEquationAlpha, (int)value);
- }
- }
-
- /// <summary>
- /// Gets and Sets BlendFactorSrcRgb.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- public int BlendFactorSrcRgb
- {
- get
- {
- return (int)InternalBlendFactorSrcRgb;
- }
- set
- {
- InternalBlendFactorSrcRgb = (BlendFactorType)value;
- }
- }
-
- /// <summary>
- /// Gets and Sets BlendFactorSrcRgb by BlendFactorType enum.
- /// </summary>
- private BlendFactorType InternalBlendFactorSrcRgb
- {
- get
- {
- return (BlendFactorType)Object.InternalGetPropertyInt(SwigCPtr, Renderer.Property.BlendFactorSrcRgb);
- }
- set
- {
- Object.InternalSetPropertyInt(SwigCPtr, Renderer.Property.BlendFactorSrcRgb, (int)value);
- }
- }
-
- /// <summary>
- /// Gets and Sets BlendFactorDestRgb.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- public int BlendFactorDestRgb
- {
- get
- {
- return (int)InternalBlendFactorDestRgb;
- }
- set
- {
- InternalBlendFactorDestRgb = (BlendFactorType)value;
- }
- }
-
- /// <summary>
- /// Gets and Sets BlendFactorDestRgb by BlendFactorType enum.
- /// </summary>
- private BlendFactorType InternalBlendFactorDestRgb
- {
- get
- {
- return (BlendFactorType)Object.InternalGetPropertyInt(SwigCPtr, Renderer.Property.BlendFactorDestRgb);
- }
- set
- {
- Object.InternalSetPropertyInt(SwigCPtr, Renderer.Property.BlendFactorDestRgb, (int)value);
- }
- }
-
- /// <summary>
- /// Gets and Sets BlendFactorSrcAlpha.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- public int BlendFactorSrcAlpha
- {
- get
- {
- return (int)InternalBlendFactorSrcAlpha;
- }
- set
- {
- InternalBlendFactorSrcAlpha = (BlendFactorType)value;
- }
- }
-
- /// <summary>
- /// Gets and Sets BlendFactorSrcAlpha by BlendFactorType enum.
- /// </summary>
- private BlendFactorType InternalBlendFactorSrcAlpha
- {
- get
- {
- return (BlendFactorType)Object.InternalGetPropertyInt(SwigCPtr, Renderer.Property.BlendFactorSrcAlpha);
- }
- set
- {
- Object.InternalSetPropertyInt(SwigCPtr, Renderer.Property.BlendFactorSrcAlpha, (int)value);
- }
- }
-
- /// <summary>
- /// Gets and Sets BlendFactorDestAlpha.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- public int BlendFactorDestAlpha
- {
- get
- {
- return (int)InternalBlendFactorDestAlpha;
- }
- set
- {
- InternalBlendFactorDestAlpha = (BlendFactorType)value;
- }
- }
-
- /// <summary>
- /// Gets and Sets BlendFactorDestAlpha by BlendFactorType enum.
- /// </summary>
- private BlendFactorType InternalBlendFactorDestAlpha
- {
- get
- {
- return (BlendFactorType)Object.InternalGetPropertyInt(SwigCPtr, Renderer.Property.BlendFactorDestAlpha);
- }
- set
- {
- Object.InternalSetPropertyInt(SwigCPtr, Renderer.Property.BlendFactorDestAlpha, (int)value);
- }
- }
-
- /// <summary>
- /// Gets and Sets BlendColor.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- public Vector4 BlendColor
- {
- get
- {
- Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
- var pValue = Tizen.NUI.Object.GetProperty(SwigCPtr, Renderer.Property.BlendColor);
- pValue.Get(temp);
- pValue.Dispose();
- return temp;
- }
- set
- {
- var temp = new Tizen.NUI.PropertyValue(value);
- Tizen.NUI.Object.SetProperty(SwigCPtr, Renderer.Property.BlendColor, temp);
- temp.Dispose();
- }
- }
-
- /// <summary>
- /// Gets and Sets BlendPreMultipliedAlpha.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- public bool BlendPreMultipliedAlpha
- {
- get
- {
- bool temp = false;
- var pValue = Tizen.NUI.Object.GetProperty(SwigCPtr, Renderer.Property.BlendPreMultipliedAlpha);
- pValue.Get(out temp);
- pValue.Dispose();
- return temp;
- }
- set
- {
- var temp = new Tizen.NUI.PropertyValue(value);
- Tizen.NUI.Object.SetProperty(SwigCPtr, Renderer.Property.BlendPreMultipliedAlpha, temp);
- temp.Dispose();
- }
- }
-
- /// <summary>
- /// Gets and Sets IndexRangeFirst.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- public int IndexRangeFirst
- {
- get
- {
- int temp = 0;
- var pValue = Tizen.NUI.Object.GetProperty(SwigCPtr, Renderer.Property.IndexRangeFirst);
- pValue.Get(out temp);
- pValue.Dispose();
- return temp;
- }
- set
- {
- var temp = new Tizen.NUI.PropertyValue(value);
- Tizen.NUI.Object.SetProperty(SwigCPtr, Renderer.Property.IndexRangeFirst, temp);
- temp.Dispose();
- }
- }
-
- /// <summary>
- /// Gets and Sets IndexRangeCount.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- public int IndexRangeCount
- {
- get
- {
- int temp = 0;
- var pValue = Tizen.NUI.Object.GetProperty(SwigCPtr, Renderer.Property.IndexRangeCount);
- pValue.Get(out temp);
- pValue.Dispose();
- return temp;
- }
- set
- {
- var temp = new Tizen.NUI.PropertyValue(value);
- Tizen.NUI.Object.SetProperty(SwigCPtr, Renderer.Property.IndexRangeCount, temp);
- temp.Dispose();
- }
- }
-
- /// <summary>
- /// Gets and Sets DepthWriteMode.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- public int DepthWriteMode
- {
- get
- {
- return (int)InternalDepthWriteMode;
- }
- set
- {
- InternalDepthWriteMode = (DepthWriteModeType)value;
- }
- }
-
- /// <summary>
- /// Gets and Sets DepthWriteMode by DepthWriteModeType enum.
- /// </summary>
- private DepthWriteModeType InternalDepthWriteMode
- {
- get
- {
- return (DepthWriteModeType)Object.InternalGetPropertyInt(SwigCPtr, Renderer.Property.DepthWriteMode);
- }
- set
- {
- Object.InternalSetPropertyInt(SwigCPtr, Renderer.Property.DepthWriteMode, (int)value);
- }
- }
-
- /// <summary>
- /// Gets and Sets DepthFunction.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- public int DepthFunction
- {
- get
- {
- return (int)InternalDepthFunction;
- }
- set
- {
- InternalDepthFunction = (DepthFunctionType)value;
- }
- }
-
- /// <summary>
- /// Gets and Sets DepthFunction by DepthFunctionType enum.
- /// </summary>
- private DepthFunctionType InternalDepthFunction
- {
- get
- {
- return (DepthFunctionType)Object.InternalGetPropertyInt(SwigCPtr, Renderer.Property.DepthFunction);
- }
- set
- {
- Object.InternalSetPropertyInt(SwigCPtr, Renderer.Property.DepthFunction, (int)value);
- }
- }
-
- /// <summary>
- /// Gets and Sets DepthTestMode.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- public int DepthTestMode
- {
- get
- {
- return (int)InternalDepthTestMode;
- }
- set
- {
- InternalDepthTestMode = (DepthTestModeType)value;
- }
- }
-
- /// <summary>
- /// Gets and Sets DepthTestMode by DepthTestModeType enum.
- /// </summary>
- private DepthTestModeType InternalDepthTestMode
- {
- get
- {
- return (DepthTestModeType)Object.InternalGetPropertyInt(SwigCPtr, Renderer.Property.DepthTestMode);
- }
- set
- {
- Object.InternalSetPropertyInt(SwigCPtr, Renderer.Property.DepthTestMode, (int)value);
- }
- }
-
- /// <summary>
- /// Gets and Sets RenderMode.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- public int RenderMode
- {
- get
- {
- return (int)InternalRenderMode;
- }
- set
- {
- InternalRenderMode = (RenderModeType)value;
- }
- }
-
- /// <summary>
- /// Gets and Sets RenderMode by RenderModeType enum.
- /// </summary>
- private RenderModeType InternalRenderMode
- {
- get
- {
- return (RenderModeType)Object.InternalGetPropertyInt(SwigCPtr, Renderer.Property.RenderMode);
- }
- set
- {
- Object.InternalSetPropertyInt(SwigCPtr, Renderer.Property.RenderMode, (int)value);
- }
- }
-
- /// <summary>
- /// Gets and Sets StencilFunction.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- public int StencilFunction
- {
- get
- {
- return (int)InternalStencilFunction;
- }
- set
- {
- InternalStencilFunction = (StencilFunctionType)value;
- }
- }
-
- /// <summary>
- /// Gets and Sets StencilFunction by StencilFunctionType enum.
- /// </summary>
- private StencilFunctionType InternalStencilFunction
- {
- get
- {
- return (StencilFunctionType)Object.InternalGetPropertyInt(SwigCPtr, Renderer.Property.StencilFunction);
- }
- set
- {
- Object.InternalSetPropertyInt(SwigCPtr, Renderer.Property.StencilFunction, (int)value);
- }
- }
-
- /// <summary>
- /// Gets and Sets StencilFunctionMask.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- public int StencilFunctionMask
- {
- get
- {
- int temp = 0;
- var pValue = Tizen.NUI.Object.GetProperty(SwigCPtr, Renderer.Property.StencilFunctionMask);
- pValue.Get(out temp);
- pValue.Dispose();
- return temp;
- }
- set
- {
- var temp = new Tizen.NUI.PropertyValue(value);
- Tizen.NUI.Object.SetProperty(SwigCPtr, Renderer.Property.StencilFunctionMask, temp);
- temp.Dispose();
- }
- }
-
- /// <summary>
- /// Gets and Sets StencilFunctionReference.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- public int StencilFunctionReference
- {
- get
- {
- int temp = 0;
- var pValue = Tizen.NUI.Object.GetProperty(SwigCPtr, Renderer.Property.StencilFunctionReference);
- pValue.Get(out temp);
- pValue.Dispose();
- return temp;
- }
- set
- {
- var temp = new Tizen.NUI.PropertyValue(value);
- Tizen.NUI.Object.SetProperty(SwigCPtr, Renderer.Property.StencilFunctionReference, temp);
- temp.Dispose();
- }
- }
-
- /// <summary>
- /// Gets and Sets StencilMask.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- public int StencilMask
- {
- get
- {
- int temp = 0;
- var pValue = Tizen.NUI.Object.GetProperty(SwigCPtr, Renderer.Property.StencilMask);
- pValue.Get(out temp);
- pValue.Dispose();
- return temp;
- }
- set
- {
- var temp = new Tizen.NUI.PropertyValue(value);
- Tizen.NUI.Object.SetProperty(SwigCPtr, Renderer.Property.StencilMask, temp);
- temp.Dispose();
- }
- }
-
- /// <summary>
- /// Gets and Sets StencilOperationOnFail.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- public int StencilOperationOnFail
- {
- get
- {
- return (int)InternalStencilOperationOnFail;
- }
- set
- {
- InternalStencilOperationOnFail = (StencilOperationType)value;
- }
- }
-
- /// <summary>
- /// Gets and Sets StencilOperationOnFail by StencilOperationType enum.
- /// </summary>
- private StencilOperationType InternalStencilOperationOnFail
- {
- get
- {
- return (StencilOperationType)Object.InternalGetPropertyInt(SwigCPtr, Renderer.Property.StencilOperationOnFail);
- }
- set
- {
- Object.InternalSetPropertyInt(SwigCPtr, Renderer.Property.StencilOperationOnFail, (int)value);
- }
- }
-
- /// <summary>
- /// Gets and Sets StencilOperationOnZFail.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- public int StencilOperationOnZFail
- {
- get
- {
- return (int)InternalStencilOperationOnZFail;
- }
- set
- {
- InternalStencilOperationOnZFail = (StencilOperationType)value;
- }
- }
-
-
- /// <summary>
- /// Gets and Sets StencilOperationOnZFail by StencilOperationType enum.
- /// </summary>
- private StencilOperationType InternalStencilOperationOnZFail
- {
- get
- {
- return (StencilOperationType)Object.InternalGetPropertyInt(SwigCPtr, Renderer.Property.StencilOperationOnZFail);
- }
- set
- {
- Object.InternalSetPropertyInt(SwigCPtr, Renderer.Property.StencilOperationOnZFail, (int)value);
- }
- }
-
- /// <summary>
- /// Gets and Sets StencilOperationOnZPass property.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- public int StencilOperationOnZPass
- {
- get
- {
- return (int)InternalStencilOperationOnZPass;
- }
- set
- {
- InternalStencilOperationOnZPass = (StencilOperationType)value;
- }
- }
-
- /// <summary>
- /// Gets and Sets StencilOperationOnZPass property by StencilOperationType enum.
- /// </summary>
- private StencilOperationType InternalStencilOperationOnZPass
- {
- get
- {
- return (StencilOperationType)Object.InternalGetPropertyInt(SwigCPtr, Renderer.Property.StencilOperationOnZPass);
- }
- set
- {
- Object.InternalSetPropertyInt(SwigCPtr, Renderer.Property.StencilOperationOnZPass, (int)value);
- }
- }
-
- /// <summary>
- /// Gets and Sets extents of partial update area.
- /// </summary>
- /// <remarks>
- /// Extents the area - the position and the size - used for the attached View's partial update area calculation.
- /// This value be appended after calculate all update area, like visual offset.
- /// Change <see cref="Tizen.NUI.BaseComponents.View.UpdateAreaHint"/> value if you want to change View's partial update area.
- /// Warning : Only 0u ~ 65535u integer values are allowed for each parameters.
- /// </remarks>
- [EditorBrowsable(EditorBrowsableState.Never)]
- public UIExtents UpdateArea
- {
- get
- {
- // TODO : Clean up below logics
- using Extents temp = new Extents();
- using var pValue = Tizen.NUI.Object.GetProperty(SwigCPtr, Renderer.Property.UpdateAreaExtents);
- pValue.Get(temp);
-
- if (temp == null)
- {
- return new UIExtents(0.0f);
- }
- UIExtents result = new UIExtents((float)temp.Start, (float)temp.End, (float)temp.Top, (float)temp.Bottom);
- return result;
- }
- set
- {
- using var temp = new Tizen.NUI.PropertyValue((Extents)value);
- Tizen.NUI.Object.SetProperty(SwigCPtr, Renderer.Property.UpdateAreaExtents, temp);
- }
- }
-
- /// <summary>
- /// Sets the geometry to be used by this renderer.
- /// </summary>
- /// <param name="geometry">The geometry to be used by this renderer.</param>
- /// <since_tizen> 3 </since_tizen>
- public void SetGeometry(Geometry geometry)
- {
- Interop.Renderer.SetGeometry(SwigCPtr, Geometry.getCPtr(CurrentGeometry = geometry));
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
-
- /// <summary>
- /// Gets the geometry used by this renderer.
- /// </summary>
- /// <returns>The geometry used by the renderer.</returns>
- /// <since_tizen> 3 </since_tizen>
- public Geometry GetGeometry()
- {
- return CurrentGeometry;
- }
-
- /// <summary>
- /// Sets effective range of indices to draw from bound index buffer.
- /// </summary>
- /// <param name="firstElement">The First element to draw.</param>
- /// <param name="elementsCount">The number of elements to draw.</param>
- /// <since_tizen> 3 </since_tizen>
- public void SetIndexRange(int firstElement, int elementsCount)
- {
- Interop.Renderer.SetIndexRange(SwigCPtr, firstElement, elementsCount);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
-
- /// <summary>
- /// Sets the texture set to be used by this renderer.
- /// </summary>
- /// <param name="textureSet">The texture set to be used by this renderer.</param>
- /// <since_tizen> 3 </since_tizen>
- public void SetTextures(TextureSet textureSet)
- {
- Interop.Renderer.SetTextures(SwigCPtr, TextureSet.getCPtr(textureSet));
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
-
- /// <summary>
- /// Gets the texture set used by this renderer.
- /// </summary>
- /// <returns>The texture set used by the renderer.</returns>
- /// <since_tizen> 3 </since_tizen>
- public TextureSet GetTextures()
- {
- global::System.IntPtr cPtr = Interop.Renderer.GetTextures(SwigCPtr);
- TextureSet ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as TextureSet;
- if (ret != null)
- {
- Interop.BaseHandle.DeleteBaseHandle(new global::System.Runtime.InteropServices.HandleRef(this, cPtr));
- }
- else
- {
- ret = new TextureSet(cPtr, true);
- }
- NDalicPINVOKE.ThrowExceptionIfExists();
- return ret;
- }
-
- /// <summary>
- /// Sets the shader used by this renderer.
- /// </summary>
- /// <param name="shader">The shader to be used by this renderer.</param>
- /// <since_tizen> 3 </since_tizen>
- public void SetShader(Shader shader)
- {
- Interop.Renderer.SetShader(SwigCPtr, Shader.getCPtr(CurrentShader = shader));
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- }
-
- /// <summary>
- /// Gets the shader used by this renderer.
- /// </summary>
- /// <returns>The shader used by the renderer.</returns>
- /// <since_tizen> 3 </since_tizen>
- public Shader GetShader()
- {
- return CurrentShader;
- }
-
- internal Renderer(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
- {
- }
-
- /// <summary>
- /// you can override it to clean-up your own resources.
- /// </summary>
- /// <param name="type">DisposeTypes</param>
- [EditorBrowsable(EditorBrowsableState.Never)]
- protected override void Dispose(DisposeTypes type)
- {
- if (Disposed)
- {
- return;
- }
-
- if (type == DisposeTypes.Explicit)
- {
- //Called by User
- //Release your own managed resources here.
- //You should release all of your own disposable objects here.
-
- CurrentGeometry = null;
- CurrentShader = null;
- }
-
- //Release your own unmanaged resources here.
- //You should not access any managed member here except static instance.
- //because the execution order of Finalizes is non-deterministic.
-
- base.Dispose(type);
- }
-
- /// This will not be public opened.
- [EditorBrowsable(EditorBrowsableState.Never)]
- protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
- {
- Interop.Renderer.DeleteRenderer(swigCPtr);
- }
-
- /// This will be opened API after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public sealed class Ranges
- {
- /// This will be opened API after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly int BackgroundEffect = Interop.Renderer.RangesBackgroundEffectGet();
-
- /// This will be opened API after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly int Background = Interop.Renderer.RangesBackgroundGet();
-
- /// This will be opened API after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly int Content = Interop.Renderer.RangesContentGet();
-
- /// This will be opened API after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly int Decoration = Interop.Renderer.RangesDecorationGet();
-
- /// This will be opened API after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly int ForegroundEffect = Interop.Renderer.RangesForegroundEffectGet();
-
-
-
- [Obsolete("Do not use this, that is deprecated in API9 and will be removed in API11. Use BackgroundEffect instead.")]
- [EditorBrowsable(EditorBrowsableState.Never)]
- [SuppressMessage("Naming", "CA1707:Identifiers should not contain underscores", Justification = "<Pending>")]
- public static readonly int BACKGROUND_EFFECT = Interop.Renderer.RangesBackgroundEffectGet();
-
- [Obsolete("Do not use this, that is deprecated in API13 and will be removed in API15. Use Background instead.")]
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly int BACKGROUND = Interop.Renderer.RangesBackgroundGet();
-
- [Obsolete("Do not use this, that is deprecated in API13 and will be removed in API15. Use Content instead.")]
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly int CONTENT = Interop.Renderer.RangesContentGet();
-
- [Obsolete("Do not use this, that is deprecated in API13 and will be removed in API15. Use Decoration instead.")]
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly int DECORATION = Interop.Renderer.RangesDecorationGet();
-
- [Obsolete("Do not use this, that is deprecated in API9 and will be removed in API11. Use ForegroundEffect instead.")]
- [EditorBrowsable(EditorBrowsableState.Never)]
- [SuppressMessage("Naming", "CA1707:Identifiers should not contain underscores", Justification = "<Pending>")]
- public static readonly int FOREGROUND_EFFECT = Interop.Renderer.RangesForegroundEffectGet();
- }
-
- /// <summary>
- /// Enumeration for instances of properties belonging to the Renderer class.
- /// </summary>
- internal class Property
- {
- internal static readonly int DepthIndex = Interop.Renderer.DepthIndexGet();
- internal static readonly int FaceCullingMode = Interop.Renderer.FaceCullingModeGet();
- internal static readonly int BlendMode = Interop.Renderer.BlendModeGet();
- internal static readonly int BlendEquationRgb = Interop.Renderer.BlendEquationRgbGet();
- internal static readonly int BlendEquationAlpha = Interop.Renderer.BlendEquationAlphaGet();
- internal static readonly int BlendFactorSrcRgb = Interop.Renderer.BlendFactorSrcRgbGet();
- internal static readonly int BlendFactorDestRgb = Interop.Renderer.BlendFactorDestRgbGet();
- internal static readonly int BlendFactorSrcAlpha = Interop.Renderer.BlendFactorSrcAlphaGet();
- internal static readonly int BlendFactorDestAlpha = Interop.Renderer.BlendFactorDestAlphaGet();
- internal static readonly int BlendColor = Interop.Renderer.BlendColorGet();
- internal static readonly int BlendPreMultipliedAlpha = Interop.Renderer.BlendPreMultipliedAlphaGet();
- internal static readonly int IndexRangeFirst = Interop.Renderer.IndexRangeFirstGet();
- internal static readonly int IndexRangeCount = Interop.Renderer.IndexRangeCountGet();
- internal static readonly int DepthWriteMode = Interop.Renderer.DepthWriteModeGet();
- internal static readonly int DepthFunction = Interop.Renderer.DepthFunctionGet();
- internal static readonly int DepthTestMode = Interop.Renderer.DepthTestModeGet();
- internal static readonly int RenderMode = Interop.Renderer.RenderModeGet();
- internal static readonly int StencilFunction = Interop.Renderer.StencilFunctionGet();
- internal static readonly int StencilFunctionMask = Interop.Renderer.StencilFunctionMaskGet();
- internal static readonly int StencilFunctionReference = Interop.Renderer.StencilFunctionReferenceGet();
- internal static readonly int StencilMask = Interop.Renderer.StencilMaskGet();
- internal static readonly int StencilOperationOnFail = Interop.Renderer.StencilOperationOnFailGet();
- internal static readonly int StencilOperationOnZFail = Interop.Renderer.StencilOperationOnZFailGet();
- internal static readonly int StencilOperationOnZPass = Interop.Renderer.StencilOperationOnZPassGet();
- internal static readonly int MixColor = Interop.Renderer.MixColorGet();
- internal static readonly int MixColorRed = Interop.Renderer.MixColorRedGet();
- internal static readonly int MixColorGreen = Interop.Renderer.MixColorGreenGet();
- internal static readonly int MixColorBlue = Interop.Renderer.MixColorBlueGet();
- internal static readonly int MixColorOpacity = Interop.Renderer.MixColorOpacityGet();
- internal static readonly int RenderingBehavior = Interop.Renderer.RenderingBehaviorGet();
- internal static readonly int BlendEquation = Interop.Renderer.BlendEquationGet();
- internal static readonly int VertexRangeFirst = Interop.Renderer.IndexRangeFirstGet();
- internal static readonly int VertexRangeCount = Interop.Renderer.IndexRangeCountGet();
- internal static readonly int InstanceCount = Interop.Renderer.InstanceCountGet();
- internal static readonly int UpdateAreaExtents = Interop.Renderer.UpdateAreaExtentsGet();
- }
- }
-}
-// Copyright (c) 2023 Samsung Electronics Co., Ltd.
+// Copyright (c) 2025 Samsung Electronics Co., Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
/// </summary>
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- public enum FaceCullingModeType
+ public enum FaceCullingMode
{
/// <summary>
/// None of the faces should be culled
/// </summary>
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- public enum BlendModeType
+ public enum BlendMode
{
/// <summary>
/// Blending is disabled.
/// </summary>
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- public enum BlendEquationType
+ public enum BlendEquation
{
/// <summary>
/// The source and destination colors are added to each other.
/// </summary>
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- Add = 0x8006,
+ Add = 0,
/// <summary>
/// Use minimum value of the source and the destination.
/// </remark>
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- Min = 0x8007,
+ Min,
/// <summary>
/// Use maximum value of the source and the destination.
/// </remark>
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- Max = 0x8008,
+ Max,
/// <summary>
/// Subtracts the destination from the source.
/// </summary>
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- Subtract = 0x800A,
+ Subtract,
/// <summary>
/// Subtracts the source from the destination.
/// </summary>
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- ReverseSubtract = 0x800B,
+ ReverseSubtract,
//Advanced Blend Equation
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- Multiply = 0x9294,
+ Multiply,
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- Screen = 0x9295,
+ Screen,
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- Overlay = 0x9296,
+ Overlay,
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- Darken = 0x9297,
+ Darken,
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- Lighten = 0x9298,
+ Lighten,
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- ColorDodge = 0x9299,
+ ColorDodge,
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- ColorBurn = 0x929A,
+ ColorBurn,
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- HardLight = 0x929B,
+ HardLight,
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- SoftLight = 0x929C,
+ SoftLight,
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- Difference = 0x929E,
+ Difference,
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- Exclusion = 0x92A0,
+ Exclusion,
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- Hue = 0x92AD,
+ Hue,
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- Saturation = 0x92AE,
+ Saturation,
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- Color = 0x92AF,
+ Color,
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- Luminosity = 0x92B0,
+ Luminosity,
}
/// <summary>
/// </summary>
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- public enum BlendFactorType
+ public enum BlendFactor
{
/// <summary>
/// Match as GL_ZERO
/// </summary>
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- One = 1,
+ One,
/// <summary>
/// Match as GL_SRC_COLOR
/// </summary>
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- SrcColor = 0x0300,
+ SourceColor,
/// <summary>
/// Match as GL_ONE_MINUS_SRC_COLOR
/// </summary>
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- OneMinusSrcColor = 0x0301,
+ OneMinusSourceColor,
/// <summary>
/// Match as GL_SRC_ALPHA
/// </summary>
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- SrcAlpha = 0x0302,
+ SourceAlpha,
/// <summary>
/// Match as GL_ONE_MINUS_SRC_ALPHA
/// </summary>
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- OneMinusSrcAlpha = 0x0303,
+ OneMinusSourceAlpha,
/// <summary>
/// Match as GL_DST_ALPHA
/// </summary>
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- DstAlpha = 0x0304,
+ DestinationAlpha,
/// <summary>
/// Match as GL_ONE_MINUS_DST_ALPHA
/// </summary>
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- OneMinusDstAlpha = 0x0305,
+ OneMinusDestinationAlpha,
/// <summary>
/// Match as GL_DST_COLOR
/// </summary>
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- DstColor = 0x0306,
+ DestinationColor,
/// <summary>
/// Match as GL_ONE_MINUS_DST_COLOR
/// </summary>
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- OneMinusDstColor = 0x0307,
+ OneMinusDestinationColor,
/// <summary>
/// Match as GL_SRC_ALPHA_SATURATE
/// </summary>
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- SrcAlphaSaturate = 0x0308,
+ SourceAlphaSaturate,
/// <summary>
/// Match as GL_CONSTANT_COLOR
/// </summary>
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- ConstantColor = 0x8001,
+ ConstantColor,
/// <summary>
/// Match as GL_ONE_MINUS_CONSTANT_COLOR
/// </summary>
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- OneMinusConstantColor = 0x8002,
+ OneMinusConstantColor,
/// <summary>
/// Match as GL_CONSTANT_ALPHA
/// </summary>
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- ConstantAlpha = 0x8003,
+ ConstantAlpha,
/// <summary>
/// Match as GL_ONE_MINUS_CONSTANT_ALPHA
/// </summary>
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- OneMinusConstantAlpha = 0x8004,
+ OneMinusConstantAlpha,
}
/// <summary>
/// </summary>
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- public enum DepthWriteModeType
+ public enum DepthWriteMode
{
/// <summary>
/// Renderer doesn't write to the depth buffer
/// </summary>
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- public enum DepthFunctionType
+ public enum DepthFunction
{
/// <summary>
/// Depth test never passes
/// </summary>
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- public enum DepthTestModeType
+ public enum DepthTestMode
{
/// <summary>
/// Renderer does not read from the depth buffer
/// </summary>
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- public enum RenderModeType
+ public enum RenderMode
{
/// <summary>
/// Do not write to either color or stencil buffer (But will potentially render to depth buffer).
/// </summary>
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- public enum StencilFunctionType
+ public enum StencilFunction
{
/// <summary>
/// Always fails
/// </summary>
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- public enum StencilOperationType
+ public enum StencilOperation
{
/// <summary>
/// Sets the stencil buffer value to 0
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
Replace,
-
+
/// <summary>
/// Increments the current stencil buffer value. Clamps to the maximum representable unsigned value
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
DecrementWrap,
}
-}
+}
\ No newline at end of file
/*
- * Copyright(c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/// Sampler is a handle to an object that can be used to provide the sampling parameters to sample textures.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- public class Sampler : BaseHandle
+ public partial class Sampler : BaseHandle
{
+ private SamplerFilter minificationFilter = SamplerFilter.Linear;
+ private SamplerFilter magnificationFilter = SamplerFilter.Linear;
+ private MipmapFilter mipmapFilter = MipmapFilter.None;
/// <summary>
/// Create an instance of Sampler.
}
/// <summary>
- /// Sets the filter modes for this sampler.
+ /// Determines how a texture is sampled when scaled down
/// </summary>
- /// <param name="minFilter">The minification filter that will be used.</param>
- /// <param name="magFilter">The magnification filter that will be used.</param>
- /// <since_tizen> 3 </since_tizen>
- public void SetFilterMode(FilterModeType minFilter, FilterModeType magFilter)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public SamplerFilter MinificationFilter
{
- Interop.Sampler.SetFilterMode(SwigCPtr, (int)minFilter, (int)magFilter);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ get => minificationFilter;
+ set
+ {
+ if (minificationFilter != value)
+ {
+ minificationFilter = value;
+ SetFilterMode(SamplerUtility.GetPresetFilter(minificationFilter, mipmapFilter), SamplerUtility.GetPresetFilter(magnificationFilter));
+ }
+ }
+ }
+
+ /// <summary>
+ /// Determines how a texture is sampled when scaled up
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public SamplerFilter MagnificationFilter
+ {
+ get => magnificationFilter;
+ set
+ {
+ if (magnificationFilter != value)
+ {
+ magnificationFilter = value;
+ SetFilterMode(SamplerUtility.GetPresetFilter(minificationFilter, mipmapFilter), SamplerUtility.GetPresetFilter(magnificationFilter));
+ }
+ }
+ }
+
+ /// <summary>
+ /// Specifies how mipmaps are used for texture sampling
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public MipmapFilter MipmapFilter
+ {
+ get => mipmapFilter;
+ set
+ {
+ if (mipmapFilter != value)
+ {
+ mipmapFilter = value;
+ SetFilterMode(SamplerUtility.GetPresetFilter(minificationFilter, mipmapFilter), SamplerUtility.GetPresetFilter(magnificationFilter));
+ }
+ }
}
/// <summary>
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
+ /// <summary>
+ /// Sets the filter modes for this sampler.
+ /// </summary>
+ /// <param name="minFilter">The minification filter that will be used.</param>
+ /// <param name="magFilter">The magnification filter that will be used.</param>
+ private void SetFilterMode(SamplerUtility.PresetFilter minFilter, SamplerUtility.PresetFilter magFilter)
+ {
+ Interop.Sampler.SetFilterMode(SwigCPtr, (int)minFilter, (int)magFilter);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
internal Sampler(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
{
}
--- /dev/null
+// Copyright (c) 2025 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+using System.ComponentModel;
+
+namespace Tizen.NUI
+{
+ /// <summary>
+ /// Specifies the sampling filter method
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public enum SamplerFilter
+ {
+ /// <summary>
+ /// Uses the nearest texture sample
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ Nearest,
+
+ /// <summary>
+ /// Uses linear interpolation between texture samples
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ Linear,
+ }
+}
\ No newline at end of file
/*
- * Copyright(c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/// Shader allows custom vertex and color transformations in the GPU.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- public class Shader : Animatable
+ public partial class Shader : Animatable
{
/// <summary>
/// <param name="vertexShader">The vertex shader code for the effect.</param>
/// <param name="fragmentShader">The fragment Shader code for the effect.</param>
/// <param name="hints">The hints to define the geometry of the rendered object.</param>
- /// <since_tizen> 3 </since_tizen>
- public Shader(string vertexShader, string fragmentShader, Shader.Hint.Value hints) : this(vertexShader, fragmentShader, hints, "")
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Shader(string vertexShader, string fragmentShader, ShaderHint hints) : this(vertexShader, fragmentShader, hints, "")
{
}
/// <param name="vertexShader">The vertex shader code for the effect.</param>
/// <param name="fragmentShader">The fragment Shader code for the effect.</param>
/// <since_tizen> 3 </since_tizen>
- public Shader(string vertexShader, string fragmentShader) : this(vertexShader, fragmentShader, Shader.Hint.Value.NONE, "")
+ public Shader(string vertexShader, string fragmentShader) : this(vertexShader, fragmentShader, ShaderHint.None, "")
{
}
/// <param name="fragmentShader">The fragment Shader code for the effect.</param>
/// <param name="shaderName">The name of this shader object.</param>
[EditorBrowsable(EditorBrowsableState.Never)]
- public Shader(string vertexShader, string fragmentShader, string shaderName) : this(vertexShader, fragmentShader, Shader.Hint.Value.NONE, shaderName)
+ public Shader(string vertexShader, string fragmentShader, string shaderName) : this(vertexShader, fragmentShader, ShaderHint.None, shaderName)
{
}
[EditorBrowsable(EditorBrowsableState.Never)]
public string Name { get; private set; }
- internal Shader(string vertexShader, string fragmentShader, Shader.Hint.Value hints, string shaderName) : this(Interop.Shader.New(vertexShader, fragmentShader, (int)hints, shaderName ?? ""), true)
+ internal Shader(string vertexShader, string fragmentShader, ShaderHint hints, string shaderName) : this(Interop.Shader.New(vertexShader, fragmentShader, (int)hints, shaderName ?? ""), true)
{
Name = shaderName ?? "";
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
Interop.Shader.DeleteShader(swigCPtr);
}
- /// <summary>
- /// The Hint class is used to provide additional information to the shader.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- public sealed class Hint
- {
- /// <summary>
- /// Enumeration for the hint value.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- public enum Value
- {
- /// <summary>
- /// No hints.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- NONE = 0x00,
-
- /// <summary>
- /// Might generate transparent alpha from opaque inputs
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- OUTPUT_IS_TRANSPARENT = 0x01,
-
- /// <summary>
- /// Might change position of vertices, this option disables any culling optimizations
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- MODIFIES_GEOMETRY = 0x02
- }
- }
-
/// <summary>
/// Enumeration for instances of properties belonging to the Shader class.
/// </summary>
--- /dev/null
+// Copyright (c) 2025 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+using System.ComponentModel;
+
+namespace Tizen.NUI
+{
+ /// <summary>
+ /// The Hint class is used to provide additional information to the shader.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public enum ShaderHint
+ {
+ /// <summary>
+ /// No hints.
+ /// </summary>
+ None = 0x00,
+
+ /// <summary>
+ /// Might generate transparent alpha from opaque inputs
+ /// </summary>
+ TransparentOutput = 0x01,
+
+ /// <summary>
+ /// Might change position of vertices, this option disables any culling optimizations
+ /// </summary>
+ ModifiesGeometry = 0x02
+ }
+}
\ No newline at end of file
/*
- * Copyright(c) 2017 Samsung Electronics Co., Ltd.
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/// Texture represents a texture object used as input or output by shaders.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- public class Texture : BaseHandle
+ public partial class Texture : BaseHandle
{
/// <summary>
/// Creates a new Texture object.
/// </summary>
- /// <param name="type">The type of the texture.</param>
+ /// <param name="textureShape">The type of the texture.</param>
/// <param name="format">The format of the pixel data.</param>
/// <param name="width">The width of the texture.</param>
/// <param name="height">The height of the texture.</param>
- /// <since_tizen> 3 </since_tizen>
- public Texture(TextureType type, PixelFormat format, uint width, uint height) : this(Interop.Texture.New((int)type, (int)format, width, height), true)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Texture(TextureShape textureShape, PixelFormat format, uint width, uint height) : this(Interop.Texture.New((int)textureShape, (int)format, width, height), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-
}
[EditorBrowsable(EditorBrowsableState.Never)]
public Texture(NativeImageInterface nativeImageInterface) : this(Interop.Texture.New(NativeImageInterface.getCPtr(nativeImageInterface)), true)
{
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
-
}
internal Texture(IntPtr tbmSurface) : this(Interop.Texture.NewTbmSurface(tbmSurface), true)
/// Uploads data to the texture from a PixelData object.
/// </summary>
/// <param name="pixelData">The pixelData object.</param>
- /// <param name="layer">The layer of a cube map or array texture.</param>
- /// <param name="mipmap">The level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image.</param>
- /// <param name="xOffset">The horizontal offset of the rectangular area in the texture that will be updated.</param>
- /// <param name="yOffset">The vertical offset of the rectangular area in the texture that will be updated.</param>
- /// <param name="width">The width of the rectangular area in the texture that will be updated.</param>
- /// <param name="height">height of the rectangular area in the texture that will be updated.</param>
+ /// <param name="properties">Properties used to upload PixelData.</param>
/// <returns>True if the PixelData object has compatible pixel format and fits within the texture, false otherwise.</returns>
- /// <since_tizen> 3 </since_tizen>
- public bool Upload(PixelData pixelData, uint layer, uint mipmap, uint xOffset, uint yOffset, uint width, uint height)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool Upload(PixelData pixelData, TextureUploadProperties properties)
{
- bool ret = Interop.Texture.Upload(SwigCPtr, PixelData.getCPtr(pixelData), layer, mipmap, xOffset, yOffset, width, height);
+ bool ret = Interop.Texture.Upload(SwigCPtr, PixelData.getCPtr(pixelData), properties.layer, properties.mipmap, properties.xOffset, properties.yOffset, properties.width, properties.height);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
/*
- * Copyright(c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/// The images have to be ordered in the same order they are declared in the shader.
/// </summary>
/// <since_tizen> 3 </since_tizen>
- public class TextureSet : BaseHandle
+ public partial class TextureSet : BaseHandle
{
-
/// <summary>
/// Create an instance of TextureSet.
/// </summary>
{
}
+ /// <summary>
+ /// Gets texture count.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public uint TextureCount
+ {
+ get => RetrieveTextureCount();
+ }
+
/// <summary>
/// Sets the texture at position "index".
/// </summary>
/// Gets the number of textures present in the TextureSet.
/// </summary>
/// <returns>The number of textures in the TextureSet.</returns>
- /// <since_tizen> 3 </since_tizen>
- public uint GetTextureCount()
+ private uint RetrieveTextureCount()
{
uint ret = Interop.TextureSet.GetTextureCount(SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
--- /dev/null
+// Copyright (c) 2025 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+using System.ComponentModel;
+
+namespace Tizen.NUI
+{
+ /// <summary>
+ /// Defines shapes of the Texture.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public enum TextureShape
+ {
+ /// <summary>
+ /// One 2D image
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ Texture2D,
+ /// <summary>
+ /// Six 2D images arranged in a cube-shape
+ /// </summary>
+ /// <since_tizen> 3 </since_tizen>
+ TextureCube
+ }
+}
\ No newline at end of file
+++ /dev/null
-/*
- * Copyright(c) 2021 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-namespace Tizen.NUI
-{
- /// <summary>
- /// The TextureType enumeration defines the types of textures.
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- public enum TextureType
- {
- /// <summary>
- /// One 2D image
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- TEXTURE_2D,
- /// <summary>
- /// Six 2D images arranged in a cube-shape
- /// </summary>
- /// <since_tizen> 3 </since_tizen>
- TEXTURE_CUBE
- }
-}
--- /dev/null
+/*
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System;
+using System.ComponentModel;
+
+namespace Tizen.NUI
+{
+ /// <summary>
+ /// Structure to define properties for texture upload
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public struct TextureUploadProperties
+ {
+ /// <summary>
+ /// The layer of a cube map or array texture.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public uint layer;
+
+ /// <summary>
+ /// The level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap reduction image.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public uint mipmap;
+
+ /// <summary>
+ /// The horizontal offset of the rectangular area in the texture that will be updated.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public uint xOffset;
+
+ /// <summary>
+ /// The vertical offset of the rectangular area in the texture that will be updated.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public uint yOffset;
+
+ /// <summary>
+ /// The width of the rectangular area in the texture that will be updated.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public uint width;
+
+ /// <summary>
+ /// height of the rectangular area in the texture that will be updated.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public uint height;
+ }
+}
/*
- * Copyright(c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright(c) 2025 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/// VertexBuffers can be used to provide data to Geometry objects.
/// </summary>
/// <since_tizen> 8 </since_tizen>
- public class VertexBuffer : BaseHandle
+ public partial class VertexBuffer : BaseHandle
{
-
/// <summary>
/// The constructor to creates a VertexBuffer.
/// </summary>
{
}
+ /// <summary>
+ /// Gets the number of elements in the buffer.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public uint Size
+ {
+ get => RetrieveSize();
+ }
+
/// <summary>
/// Updates the whole buffer information.<br />
/// This function expects an array of structures with the same format that was given in the construction.
/// Gets the number of elements in the buffer.
/// </summary>
/// <returns>Number of elements in the buffer.</returns>
- /// <since_tizen> 8 </since_tizen>
- public uint GetSize()
+ private uint RetrieveSize()
{
uint ret = Interop.VertexBuffer.GetSize(SwigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending)