1 /** Copyright (c) 2017 Samsung Electronics Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
20 /// Sampler is a handle to an object that can be used to provide the sampling parameters to sample textures.
22 public class Sampler : BaseHandle
24 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
26 internal Sampler(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Sampler_SWIGUpcast(cPtr), cMemoryOwn)
28 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
31 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Sampler obj)
33 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
36 protected override void Dispose(DisposeTypes type)
43 if (type == DisposeTypes.Explicit)
46 //Release your own managed resources here.
47 //You should release all of your own disposable objects here.
51 //Release your own unmanaged resources here.
52 //You should not access any managed member here except static instance.
53 //because the execution order of Finalizes is non-deterministic.
56 if (swigCPtr.Handle != global::System.IntPtr.Zero)
61 NDalicPINVOKE.delete_Sampler(swigCPtr);
63 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
70 /// Create an instance of Sampler.
72 /// <since_tizen> 3 </since_tizen>
73 public Sampler() : this(NDalicPINVOKE.Sampler_New(), true)
75 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
80 /// Sets the filter modes for this sampler.
82 /// <param name="minFilter">The minification filter that will be used.</param>
83 /// <param name="magFilter">The magnification filter that will be used.</param>
84 /// <since_tizen> 3 </since_tizen>
85 public void SetFilterMode(FilterModeType minFilter, FilterModeType magFilter)
87 NDalicPINVOKE.Sampler_SetFilterMode(swigCPtr, (int)minFilter, (int)magFilter);
88 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
92 /// Sets the wrap modes for this sampler.
94 /// <param name="uWrap">Wrap mode for u coordinates.</param>
95 /// <param name="vWrap">Wrap mode for v coordinates.</param>
96 /// <since_tizen> 3 </since_tizen>
97 public void SetWrapMode(WrapModeType uWrap, WrapModeType vWrap)
99 NDalicPINVOKE.Sampler_SetWrapMode__SWIG_0(swigCPtr, (int)uWrap, (int)vWrap);
100 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
104 /// Sets the wrap modes for this sampler.
106 /// <param name="rWrap">Wrap mode for the x direction.</param>
107 /// <param name="sWrap">Wrap mode for the y direction.</param>
108 /// <param name="tWrap">Wrap mode for the z direction.</param>
109 /// <since_tizen> 3 </since_tizen>
110 public void SetWrapMode(WrapModeType rWrap, WrapModeType sWrap, WrapModeType tWrap)
112 NDalicPINVOKE.Sampler_SetWrapMode__SWIG_1(swigCPtr, (int)rWrap, (int)sWrap, (int)tWrap);
113 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();