[NUI] Fix memory leak (#111)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / Renderer.cs
1 /*
2  * Copyright(c) 2017 Samsung Electronics Co., Ltd.
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  *
16  */
17
18 using System.Runtime.InteropServices;
19
20 namespace Tizen.NUI
21 {
22     /// <summary>
23     /// Renderer is a handle to an object used to show content by combining a Geometry, a TextureSet and a shader.
24     /// </summary>
25     /// <since_tizen> 3 </since_tizen>
26     public class Renderer : Animatable
27     {
28         private global::System.Runtime.InteropServices.HandleRef swigCPtr;
29
30         internal Renderer(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Renderer_SWIGUpcast(cPtr), cMemoryOwn)
31         {
32             swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
33         }
34
35         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Renderer obj)
36         {
37             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
38         }
39
40         /// <summary>
41         /// Dispose.
42         /// </summary>
43         /// <since_tizen> 3 </since_tizen>
44         protected override void Dispose(DisposeTypes type)
45         {
46             if (disposed)
47             {
48                 return;
49             }
50
51             if (type == DisposeTypes.Explicit)
52             {
53                 //Called by User
54                 //Release your own managed resources here.
55                 //You should release all of your own disposable objects here.
56
57             }
58
59             //Release your own unmanaged resources here.
60             //You should not access any managed member here except static instance.
61             //because the execution order of Finalizes is non-deterministic.
62
63
64             if (swigCPtr.Handle != global::System.IntPtr.Zero)
65             {
66                 if (swigCMemOwn)
67                 {
68                     swigCMemOwn = false;
69                     NDalicPINVOKE.delete_Renderer(swigCPtr);
70                 }
71                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
72             }
73
74             base.Dispose(type);
75         }
76
77         /// <summary>
78         /// Enumeration for instances of properties belonging to the Renderer class.
79         /// </summary>
80         /// <since_tizen> 3 </since_tizen>
81         public class Property
82         {
83             /// <summary>
84             /// This should be internal, please do not use.
85             /// </summary>
86             /// <since_tizen> 3 </since_tizen>
87             public static readonly int DEPTH_INDEX = NDalicPINVOKE.Renderer_Property_DEPTH_INDEX_get();
88             /// <summary>
89             /// This should be internal, please do not use.
90             /// </summary>
91             /// <since_tizen> 3 </since_tizen>
92             public static readonly int FACE_CULLING_MODE = NDalicPINVOKE.Renderer_Property_FACE_CULLING_MODE_get();
93             /// <summary>
94             /// This should be internal, please do not use.
95             /// </summary>
96             /// <since_tizen> 3 </since_tizen>
97             public static readonly int BLEND_MODE = NDalicPINVOKE.Renderer_Property_BLEND_MODE_get();
98             /// <summary>
99             /// This should be internal, please do not use.
100             /// </summary>
101             /// <since_tizen> 3 </since_tizen>
102             public static readonly int BLEND_EQUATION_RGB = NDalicPINVOKE.Renderer_Property_BLEND_EQUATION_RGB_get();
103             /// <summary>
104             /// This should be internal, please do not use.
105             /// </summary>
106             /// <since_tizen> 3 </since_tizen>
107             public static readonly int BLEND_EQUATION_ALPHA = NDalicPINVOKE.Renderer_Property_BLEND_EQUATION_ALPHA_get();
108             /// <summary>
109             /// This should be internal, please do not use.
110             /// </summary>
111             /// <since_tizen> 3 </since_tizen>
112             public static readonly int BLEND_FACTOR_SRC_RGB = NDalicPINVOKE.Renderer_Property_BLEND_FACTOR_SRC_RGB_get();
113             /// <summary>
114             /// This should be internal, please do not use.
115             /// </summary>
116             /// <since_tizen> 3 </since_tizen>
117             public static readonly int BLEND_FACTOR_DEST_RGB = NDalicPINVOKE.Renderer_Property_BLEND_FACTOR_DEST_RGB_get();
118             /// <summary>
119             /// This should be internal, please do not use.
120             /// </summary>
121             /// <since_tizen> 3 </since_tizen>
122             public static readonly int BLEND_FACTOR_SRC_ALPHA = NDalicPINVOKE.Renderer_Property_BLEND_FACTOR_SRC_ALPHA_get();
123             /// <summary>
124             /// This should be internal, please do not use.
125             /// </summary>
126             /// <since_tizen> 3 </since_tizen>
127             public static readonly int BLEND_FACTOR_DEST_ALPHA = NDalicPINVOKE.Renderer_Property_BLEND_FACTOR_DEST_ALPHA_get();
128             /// <summary>
129             /// This should be internal, please do not use.
130             /// </summary>
131             /// <since_tizen> 3 </since_tizen>
132             public static readonly int BLEND_COLOR = NDalicPINVOKE.Renderer_Property_BLEND_COLOR_get();
133             /// <summary>
134             /// This should be internal, please do not use.
135             /// </summary>
136             /// <since_tizen> 3 </since_tizen>
137             public static readonly int BLEND_PRE_MULTIPLIED_ALPHA = NDalicPINVOKE.Renderer_Property_BLEND_PRE_MULTIPLIED_ALPHA_get();
138             /// <summary>
139             /// This should be internal, please do not use.
140             /// </summary>
141             /// <since_tizen> 3 </since_tizen>
142             public static readonly int INDEX_RANGE_FIRST = NDalicPINVOKE.Renderer_Property_INDEX_RANGE_FIRST_get();
143             /// <summary>
144             /// This should be internal, please do not use.
145             /// </summary>
146             /// <since_tizen> 3 </since_tizen>
147             public static readonly int INDEX_RANGE_COUNT = NDalicPINVOKE.Renderer_Property_INDEX_RANGE_COUNT_get();
148             /// <summary>
149             /// This should be internal, please do not use.
150             /// </summary>
151             /// <since_tizen> 3 </since_tizen>
152             public static readonly int DEPTH_WRITE_MODE = NDalicPINVOKE.Renderer_Property_DEPTH_WRITE_MODE_get();
153             /// <summary>
154             /// This should be internal, please do not use.
155             /// </summary>
156             /// <since_tizen> 3 </since_tizen>
157             public static readonly int DEPTH_FUNCTION = NDalicPINVOKE.Renderer_Property_DEPTH_FUNCTION_get();
158             /// <summary>
159             /// This should be internal, please do not use.
160             /// </summary>
161             /// <since_tizen> 3 </since_tizen>
162             public static readonly int DEPTH_TEST_MODE = NDalicPINVOKE.Renderer_Property_DEPTH_TEST_MODE_get();
163             /// <summary>
164             /// This should be internal, please do not use.
165             /// </summary>
166             /// <since_tizen> 3 </since_tizen>
167             public static readonly int RENDER_MODE = NDalicPINVOKE.Renderer_Property_RENDER_MODE_get();
168             /// <summary>
169             /// This should be internal, please do not use.
170             /// </summary>
171             /// <since_tizen> 3 </since_tizen>
172             public static readonly int STENCIL_FUNCTION = NDalicPINVOKE.Renderer_Property_STENCIL_FUNCTION_get();
173             /// <summary>
174             /// This should be internal, please do not use.
175             /// </summary>
176             /// <since_tizen> 3 </since_tizen>
177             public static readonly int STENCIL_FUNCTION_MASK = NDalicPINVOKE.Renderer_Property_STENCIL_FUNCTION_MASK_get();
178             /// <summary>
179             /// This should be internal, please do not use.
180             /// </summary>
181             /// <since_tizen> 3 </since_tizen>
182             public static readonly int STENCIL_FUNCTION_REFERENCE = NDalicPINVOKE.Renderer_Property_STENCIL_FUNCTION_REFERENCE_get();
183             /// <summary>
184             /// This should be internal, please do not use.
185             /// </summary>
186             /// <since_tizen> 3 </since_tizen>
187             public static readonly int STENCIL_MASK = NDalicPINVOKE.Renderer_Property_STENCIL_MASK_get();
188             /// <summary>
189             /// This should be internal, please do not use.
190             /// </summary>
191             /// <since_tizen> 3 </since_tizen>
192             public static readonly int STENCIL_OPERATION_ON_FAIL = NDalicPINVOKE.Renderer_Property_STENCIL_OPERATION_ON_FAIL_get();
193             /// <summary>
194             /// This should be internal, please do not use.
195             /// </summary>
196             /// <since_tizen> 3 </since_tizen>
197             public static readonly int STENCIL_OPERATION_ON_Z_FAIL = NDalicPINVOKE.Renderer_Property_STENCIL_OPERATION_ON_Z_FAIL_get();
198             /// <summary>
199             /// This should be internal, please do not use.
200             /// </summary>
201             /// <since_tizen> 3 </since_tizen>
202             public static readonly int STENCIL_OPERATION_ON_Z_PASS = NDalicPINVOKE.Renderer_Property_STENCIL_OPERATION_ON_Z_PASS_get();
203
204         }
205
206         /// <summary>
207         /// Create an instance of Renderer.
208         /// </summary>
209         /// <since_tizen> 3 </since_tizen>
210         public Renderer(Geometry geometry, Shader shader) : this(NDalicPINVOKE.Renderer_New(Geometry.getCPtr(geometry), Shader.getCPtr(shader)), true)
211         {
212             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
213
214         }
215
216         /// <summary>
217         /// Sets the geometry to be used by this renderer.
218         /// </summary>
219         /// <param name="geometry">The geometry to be used by this renderer.</param>
220         /// <since_tizen> 3 </since_tizen>
221         public void SetGeometry(Geometry geometry)
222         {
223             NDalicPINVOKE.Renderer_SetGeometry(swigCPtr, Geometry.getCPtr(geometry));
224             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
225         }
226
227         /// <summary>
228         /// Gets the geometry used by this renderer.
229         /// </summary>
230         /// <returns>The geometry used by the renderer.</returns>
231         /// <since_tizen> 3 </since_tizen>
232         public Geometry GetGeometry()
233         {
234             //to fix memory leak issue, match the handle count with native side.
235             System.IntPtr cPtr = NDalicPINVOKE.Renderer_GetGeometry(swigCPtr);
236             HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
237             Geometry ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Geometry;
238             NDalicPINVOKE.delete_BaseHandle(CPtr);
239             CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
240
241             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
242             return ret;
243         }
244
245         /// <summary>
246         /// Sets effective range of indices to draw from bound index buffer.
247         /// </summary>
248         /// <param name="firstElement">The First element to draw.</param>
249         /// <param name="elementsCount">The number of elements to draw.</param>
250         /// <since_tizen> 3 </since_tizen>
251         public void SetIndexRange(int firstElement, int elementsCount)
252         {
253             NDalicPINVOKE.Renderer_SetIndexRange(swigCPtr, firstElement, elementsCount);
254             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
255         }
256
257         /// <summary>
258         /// Sets the texture set to be used by this renderer.
259         /// </summary>
260         /// <param name="textureSet">The texture set to be used by this renderer.</param>
261         /// <since_tizen> 3 </since_tizen>
262         public void SetTextures(TextureSet textureSet)
263         {
264             NDalicPINVOKE.Renderer_SetTextures(swigCPtr, TextureSet.getCPtr(textureSet));
265             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
266         }
267
268         /// <summary>
269         /// Gets the texture set used by this renderer.
270         /// </summary>
271         /// <returns>The texture set used by the renderer.</returns>
272         /// <since_tizen> 3 </since_tizen>
273         public TextureSet GetTextures()
274         {
275             //to fix memory leak issue, match the handle count with native side.
276             System.IntPtr cPtr = NDalicPINVOKE.Renderer_GetTextures(swigCPtr);
277             HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
278             TextureSet ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as TextureSet;
279             NDalicPINVOKE.delete_BaseHandle(CPtr);
280             CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
281
282             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
283             return ret;
284         }
285
286         /// <summary>
287         /// Sets the shader used by this renderer.
288         /// </summary>
289         /// <param name="shader">The shader to be used by this renderer.</param>
290         /// <since_tizen> 3 </since_tizen>
291         public void SetShader(Shader shader)
292         {
293             NDalicPINVOKE.Renderer_SetShader(swigCPtr, Shader.getCPtr(shader));
294             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
295         }
296
297         /// <summary>
298         /// Gets the shader used by this renderer.
299         /// </summary>
300         /// <returns>The shader used by the renderer.</returns>
301         /// <since_tizen> 3 </since_tizen>
302         public Shader GetShader()
303         {
304             //to fix memory leak issue, match the handle count with native side.
305             System.IntPtr cPtr = NDalicPINVOKE.Renderer_GetShader(swigCPtr);
306             HandleRef CPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
307             Shader ret = Registry.GetManagedBaseHandleFromNativePtr(CPtr.Handle) as Shader;
308             NDalicPINVOKE.delete_BaseHandle(CPtr);
309             CPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
310
311             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
312             return ret;
313         }
314
315         /// <summary>
316         /// Gets and Sets DepthIndex property.
317         /// </summary>
318         /// <since_tizen> 3 </since_tizen>
319         public int DepthIndex
320         {
321             get
322             {
323                 int temp = 0;
324                 Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.DEPTH_INDEX).Get(out temp);
325                 return temp;
326             }
327             set
328             {
329                 Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.DEPTH_INDEX, new Tizen.NUI.PropertyValue(value));
330             }
331         }
332
333         /// <summary>
334         /// Gets and Sets FaceCullingMode.
335         /// </summary>
336         /// <since_tizen> 3 </since_tizen>
337         public int FaceCullingMode
338         {
339             get
340             {
341                 int temp = 0;
342                 Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.FACE_CULLING_MODE).Get(out temp);
343                 return temp;
344             }
345             set
346             {
347                 Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.FACE_CULLING_MODE, new Tizen.NUI.PropertyValue(value));
348             }
349         }
350
351         /// <summary>
352         /// Gets and Sets BlendMode.
353         /// </summary>
354         /// <since_tizen> 3 </since_tizen>
355         public int BlendMode
356         {
357             get
358             {
359                 int temp = 0;
360                 Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.BLEND_MODE).Get(out temp);
361                 return temp;
362             }
363             set
364             {
365                 Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.BLEND_MODE, new Tizen.NUI.PropertyValue(value));
366             }
367         }
368
369         /// <summary>
370         /// Gets and Sets BlendEquationRgb.
371         /// </summary>
372         /// <since_tizen> 3 </since_tizen>
373         public int BlendEquationRgb
374         {
375             get
376             {
377                 int temp = 0;
378                 Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.BLEND_EQUATION_RGB).Get(out temp);
379                 return temp;
380             }
381             set
382             {
383                 Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.BLEND_EQUATION_RGB, new Tizen.NUI.PropertyValue(value));
384             }
385         }
386
387         /// <summary>
388         /// Gets and Sets BlendEquationAlpha.
389         /// </summary>
390         /// <since_tizen> 3 </since_tizen>
391         public int BlendEquationAlpha
392         {
393             get
394             {
395                 int temp = 0;
396                 Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.BLEND_EQUATION_ALPHA).Get(out temp);
397                 return temp;
398             }
399             set
400             {
401                 Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.BLEND_EQUATION_ALPHA, new Tizen.NUI.PropertyValue(value));
402             }
403         }
404
405         /// <summary>
406         /// Gets and Sets BlendFactorSrcRgb.
407         /// </summary>
408         /// <since_tizen> 3 </since_tizen>
409         public int BlendFactorSrcRgb
410         {
411             get
412             {
413                 int temp = 0;
414                 Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.BLEND_FACTOR_SRC_RGB).Get(out temp);
415                 return temp;
416             }
417             set
418             {
419                 Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.BLEND_FACTOR_SRC_RGB, new Tizen.NUI.PropertyValue(value));
420             }
421         }
422
423         /// <summary>
424         /// Gets and Sets BlendFactorDestRgb.
425         /// </summary>
426         /// <since_tizen> 3 </since_tizen>
427         public int BlendFactorDestRgb
428         {
429             get
430             {
431                 int temp = 0;
432                 Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.BLEND_FACTOR_DEST_RGB).Get(out temp);
433                 return temp;
434             }
435             set
436             {
437                 Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.BLEND_FACTOR_DEST_RGB, new Tizen.NUI.PropertyValue(value));
438             }
439         }
440
441         /// <summary>
442         /// Gets and Sets BlendFactorSrcAlpha.
443         /// </summary>
444         /// <since_tizen> 3 </since_tizen>
445         public int BlendFactorSrcAlpha
446         {
447             get
448             {
449                 int temp = 0;
450                 Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.BLEND_FACTOR_SRC_ALPHA).Get(out temp);
451                 return temp;
452             }
453             set
454             {
455                 Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.BLEND_FACTOR_SRC_ALPHA, new Tizen.NUI.PropertyValue(value));
456             }
457         }
458
459         /// <summary>
460         /// Gets and Sets BlendFactorDestAlpha.
461         /// </summary>
462         /// <since_tizen> 3 </since_tizen>
463         public int BlendFactorDestAlpha
464         {
465             get
466             {
467                 int temp = 0;
468                 Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.BLEND_FACTOR_DEST_ALPHA).Get(out temp);
469                 return temp;
470             }
471             set
472             {
473                 Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.BLEND_FACTOR_DEST_ALPHA, new Tizen.NUI.PropertyValue(value));
474             }
475         }
476
477         /// <summary>
478         /// Gets and Sets BlendColor.
479         /// </summary>
480         /// <since_tizen> 3 </since_tizen>
481         public Vector4 BlendColor
482         {
483             get
484             {
485                 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
486                 Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.BLEND_COLOR).Get(temp);
487                 return temp;
488             }
489             set
490             {
491                 Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.BLEND_COLOR, new Tizen.NUI.PropertyValue(value));
492             }
493         }
494
495         /// <summary>
496         /// Gets and Sets BlendPreMultipliedAlpha.
497         /// </summary>
498         /// <since_tizen> 3 </since_tizen>
499         public bool BlendPreMultipliedAlpha
500         {
501             get
502             {
503                 bool temp = false;
504                 Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.BLEND_PRE_MULTIPLIED_ALPHA).Get(out temp);
505                 return temp;
506             }
507             set
508             {
509                 Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.BLEND_PRE_MULTIPLIED_ALPHA, new Tizen.NUI.PropertyValue(value));
510             }
511         }
512
513         /// <summary>
514         /// Gets and Sets IndexRangeFirst.
515         /// </summary>
516         /// <since_tizen> 3 </since_tizen>
517         public int IndexRangeFirst
518         {
519             get
520             {
521                 int temp = 0;
522                 Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.INDEX_RANGE_FIRST).Get(out temp);
523                 return temp;
524             }
525             set
526             {
527                 Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.INDEX_RANGE_FIRST, new Tizen.NUI.PropertyValue(value));
528             }
529         }
530
531         /// <summary>
532         /// Gets and Sets IndexRangeCount.
533         /// </summary>
534         /// <since_tizen> 3 </since_tizen>
535         public int IndexRangeCount
536         {
537             get
538             {
539                 int temp = 0;
540                 Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.INDEX_RANGE_COUNT).Get(out temp);
541                 return temp;
542             }
543             set
544             {
545                 Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.INDEX_RANGE_COUNT, new Tizen.NUI.PropertyValue(value));
546             }
547         }
548
549         /// <summary>
550         /// Gets and Sets DepthWriteMode.
551         /// </summary>
552         /// <since_tizen> 3 </since_tizen>
553         public int DepthWriteMode
554         {
555             get
556             {
557                 int temp = 0;
558                 Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.DEPTH_WRITE_MODE).Get(out temp);
559                 return temp;
560             }
561             set
562             {
563                 Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.DEPTH_WRITE_MODE, new Tizen.NUI.PropertyValue(value));
564             }
565         }
566
567         /// <summary>
568         /// Gets and Sets DepthFunction.
569         /// </summary>
570         /// <since_tizen> 3 </since_tizen>
571         public int DepthFunction
572         {
573             get
574             {
575                 int temp = 0;
576                 Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.DEPTH_FUNCTION).Get(out temp);
577                 return temp;
578             }
579             set
580             {
581                 Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.DEPTH_FUNCTION, new Tizen.NUI.PropertyValue(value));
582             }
583         }
584
585         /// <summary>
586         /// Gets and Sets DepthTestMode.
587         /// </summary>
588         /// <since_tizen> 3 </since_tizen>
589         public int DepthTestMode
590         {
591             get
592             {
593                 int temp = 0;
594                 Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.DEPTH_TEST_MODE).Get(out temp);
595                 return temp;
596             }
597             set
598             {
599                 Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.DEPTH_TEST_MODE, new Tizen.NUI.PropertyValue(value));
600             }
601         }
602
603         /// <summary>
604         /// Gets and Sets RenderMode.
605         /// </summary>
606         /// <since_tizen> 3 </since_tizen>
607         public int RenderMode
608         {
609             get
610             {
611                 int temp = 0;
612                 Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.RENDER_MODE).Get(out temp);
613                 return temp;
614             }
615             set
616             {
617                 Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.RENDER_MODE, new Tizen.NUI.PropertyValue(value));
618             }
619         }
620
621         /// <summary>
622         /// Gets and Sets StencilFunction.
623         /// </summary>
624         /// <since_tizen> 3 </since_tizen>
625         public int StencilFunction
626         {
627             get
628             {
629                 int temp = 0;
630                 Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.STENCIL_FUNCTION).Get(out temp);
631                 return temp;
632             }
633             set
634             {
635                 Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.STENCIL_FUNCTION, new Tizen.NUI.PropertyValue(value));
636             }
637         }
638
639         /// <summary>
640         /// Gets and Sets StencilFunctionMask.
641         /// </summary>
642         /// <since_tizen> 3 </since_tizen>
643         public int StencilFunctionMask
644         {
645             get
646             {
647                 int temp = 0;
648                 Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.STENCIL_FUNCTION_MASK).Get(out temp);
649                 return temp;
650             }
651             set
652             {
653                 Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.STENCIL_FUNCTION_MASK, new Tizen.NUI.PropertyValue(value));
654             }
655         }
656
657         /// <summary>
658         /// Gets and Sets StencilFunctionReference.
659         /// </summary>
660         /// <since_tizen> 3 </since_tizen>
661         public int StencilFunctionReference
662         {
663             get
664             {
665                 int temp = 0;
666                 Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.STENCIL_FUNCTION_REFERENCE).Get(out temp);
667                 return temp;
668             }
669             set
670             {
671                 Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.STENCIL_FUNCTION_REFERENCE, new Tizen.NUI.PropertyValue(value));
672             }
673         }
674
675         /// <summary>
676         /// Gets and Sets StencilMask.
677         /// </summary>
678         /// <since_tizen> 3 </since_tizen>
679         public int StencilMask
680         {
681             get
682             {
683                 int temp = 0;
684                 Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.STENCIL_MASK).Get(out temp);
685                 return temp;
686             }
687             set
688             {
689                 Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.STENCIL_MASK, new Tizen.NUI.PropertyValue(value));
690             }
691         }
692
693         /// <summary>
694         /// Gets and Sets StencilOperationOnFail.
695         /// </summary>
696         /// <since_tizen> 3 </since_tizen>
697         public int StencilOperationOnFail
698         {
699             get
700             {
701                 int temp = 0;
702                 Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.STENCIL_OPERATION_ON_FAIL).Get(out temp);
703                 return temp;
704             }
705             set
706             {
707                 Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.STENCIL_OPERATION_ON_FAIL, new Tizen.NUI.PropertyValue(value));
708             }
709         }
710
711         /// <summary>
712         /// Gets and Sets StencilOperationOnZFail.
713         /// </summary>
714         /// <since_tizen> 3 </since_tizen>
715         public int StencilOperationOnZFail
716         {
717             get
718             {
719                 int temp = 0;
720                 Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.STENCIL_OPERATION_ON_Z_FAIL).Get(out temp);
721                 return temp;
722             }
723             set
724             {
725                 Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.STENCIL_OPERATION_ON_Z_FAIL, new Tizen.NUI.PropertyValue(value));
726             }
727         }
728
729         /// <summary>
730         /// Gets and Sets StencilOperationOnZPass property.
731         /// </summary>
732         /// <since_tizen> 3 </since_tizen>
733         public int StencilOperationOnZPass
734         {
735             get
736             {
737                 int temp = 0;
738                 Tizen.NUI.Object.GetProperty(swigCPtr, Renderer.Property.STENCIL_OPERATION_ON_Z_PASS).Get(out temp);
739                 return temp;
740             }
741             set
742             {
743                 Tizen.NUI.Object.SetProperty(swigCPtr, Renderer.Property.STENCIL_OPERATION_ON_Z_PASS, new Tizen.NUI.PropertyValue(value));
744             }
745         }
746
747     }
748
749 }