2 * Copyright(c) 2017 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
23 /// <since_tizen> 3 </since_tizen>
24 public class Shader : Animatable
26 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
29 /// Creates Shader object.
31 /// <param name="vertexShader">The vertex shader code for the effect.</param>
32 /// <param name="fragmentShader">The fragment Shader code for the effect.</param>
33 /// <param name="hints">The hints to define the geometry of the rendered object.</param>
34 /// <since_tizen> 3 </since_tizen>
35 public Shader(string vertexShader, string fragmentShader, Shader.Hint.Value hints) : this(NDalicPINVOKE.Shader_New__SWIG_0(vertexShader, fragmentShader, (int)hints), true)
37 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
42 /// Creates Shader object.
44 /// <param name="vertexShader">The vertex shader code for the effect.</param>
45 /// <param name="fragmentShader">The fragment Shader code for the effect.</param>
46 /// <since_tizen> 3 </since_tizen>
47 public Shader(string vertexShader, string fragmentShader) : this(NDalicPINVOKE.Shader_New__SWIG_1(vertexShader, fragmentShader), true)
49 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
54 /// Gets and Sets the program property.
56 /// <since_tizen> 3 </since_tizen>
57 public Tizen.NUI.PropertyMap Program
61 Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
62 Tizen.NUI.Object.GetProperty(swigCPtr, Shader.Property.PROGRAM).Get(temp);
67 Tizen.NUI.Object.SetProperty(swigCPtr, Shader.Property.PROGRAM, new Tizen.NUI.PropertyValue(value));
71 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Shader obj)
73 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
76 internal Shader(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Shader_SWIGUpcast(cPtr), cMemoryOwn)
78 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
84 /// <since_tizen> 3 </since_tizen>
85 protected override void Dispose(DisposeTypes type)
92 if (type == DisposeTypes.Explicit)
95 //Release your own managed resources here.
96 //You should release all of your own disposable objects here.
100 //Release your own unmanaged resources here.
101 //You should not access any managed member here except static instance.
102 //because the execution order of Finalizes is non-deterministic.
104 if (swigCPtr.Handle != global::System.IntPtr.Zero)
109 NDalicPINVOKE.delete_Shader(swigCPtr);
111 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
120 /// <since_tizen> 3 </since_tizen>
124 /// Enumeration for the hint value.
126 /// <since_tizen> 3 </since_tizen>
132 /// <since_tizen> 3 </since_tizen>
136 /// Might generate transparent alpha from opaque inputs
138 /// <since_tizen> 3 </since_tizen>
139 OUTPUT_IS_TRANSPARENT = 0x01,
142 /// Might change position of vertices, this option disables any culling optimizations
144 /// <since_tizen> 3 </since_tizen>
145 MODIFIES_GEOMETRY = 0x02
150 /// Enumeration for instances of properties belonging to the Shader class.
152 /// <since_tizen> 3 </since_tizen>
153 public class Property
156 /// The default value is empty.
157 /// Format: {"vertex":"","fragment":"",hints:"","vertexPrefix":"","fragmentPrefix":""}
159 /// <since_tizen> 3 </since_tizen>
160 public static readonly int PROGRAM = NDalicPINVOKE.Shader_Property_PROGRAM_get();