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.
21 /// Sampler is a handle to an object that can be used to provide the sampling parameters to sample textures.
23 /// <since_tizen> 3 </since_tizen>
24 public class Sampler : BaseHandle
26 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
29 /// Create an instance of Sampler.
31 /// <since_tizen> 3 </since_tizen>
32 public Sampler() : this(NDalicPINVOKE.Sampler_New(), true)
34 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
39 /// Sets the filter modes for this sampler.
41 /// <param name="minFilter">The minification filter that will be used.</param>
42 /// <param name="magFilter">The magnification filter that will be used.</param>
43 /// <since_tizen> 3 </since_tizen>
44 public void SetFilterMode(FilterModeType minFilter, FilterModeType magFilter)
46 NDalicPINVOKE.Sampler_SetFilterMode(swigCPtr, (int)minFilter, (int)magFilter);
47 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
51 /// Sets the wrap modes for this sampler.
53 /// <param name="uWrap">Wrap mode for u coordinates.</param>
54 /// <param name="vWrap">Wrap mode for v coordinates.</param>
55 /// <since_tizen> 3 </since_tizen>
56 public void SetWrapMode(WrapModeType uWrap, WrapModeType vWrap)
58 NDalicPINVOKE.Sampler_SetWrapMode__SWIG_0(swigCPtr, (int)uWrap, (int)vWrap);
59 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
63 /// Sets the wrap modes for this sampler.
65 /// <param name="rWrap">Wrap mode for the x direction.</param>
66 /// <param name="sWrap">Wrap mode for the y direction.</param>
67 /// <param name="tWrap">Wrap mode for the z direction.</param>
68 /// <since_tizen> 3 </since_tizen>
69 public void SetWrapMode(WrapModeType rWrap, WrapModeType sWrap, WrapModeType tWrap)
71 NDalicPINVOKE.Sampler_SetWrapMode__SWIG_1(swigCPtr, (int)rWrap, (int)sWrap, (int)tWrap);
72 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
75 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Sampler obj)
77 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
80 internal Sampler(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Sampler_SWIGUpcast(cPtr), cMemoryOwn)
82 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
88 /// <since_tizen> 3 </since_tizen>
89 protected override void Dispose(DisposeTypes type)
96 if (type == DisposeTypes.Explicit)
99 //Release your own managed resources here.
100 //You should release all of your own disposable objects here.
104 //Release your own unmanaged resources here.
105 //You should not access any managed member here except static instance.
106 //because the execution order of Finalizes is non-deterministic.
109 if (swigCPtr.Handle != global::System.IntPtr.Zero)
114 NDalicPINVOKE.delete_Sampler(swigCPtr);
116 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);