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.
16 // This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts
17 //------------------------------------------------------------------------------
20 // This file was automatically generated by SWIG (http://www.swig.org).
23 // Do not make changes to this file unless you know what you are doing--modify
24 // the SWIG interface file instead.
25 //------------------------------------------------------------------------------
29 public class Renderer : Handle {
30 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
32 internal Renderer(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Renderer_SWIGUpcast(cPtr), cMemoryOwn) {
33 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
36 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Renderer obj) {
37 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
41 DisposeQueue.Instance.Add(this);
44 public override void Dispose() {
45 if (!Stage.IsInstalled()) {
46 DisposeQueue.Instance.Add(this);
51 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
54 NDalicPINVOKE.delete_Renderer(swigCPtr);
56 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
58 global::System.GC.SuppressFinalize(this);
64 public bool BatchingEnabled
69 GetProperty( Renderer.Property.BATCHING_ENABLED).Get( ref temp );
74 SetProperty( Renderer.Property.BATCHING_ENABLED, new Tizen.NUI.PropertyValue( value ) );
78 public class Property : global::System.IDisposable {
79 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
80 protected bool swigCMemOwn;
82 internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) {
83 swigCMemOwn = cMemoryOwn;
84 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
87 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) {
88 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
95 public virtual void Dispose() {
97 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
100 NDalicPINVOKE.delete_Renderer_Property(swigCPtr);
102 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
104 global::System.GC.SuppressFinalize(this);
108 public static readonly int BATCHING_ENABLED = NDalicManualPINVOKE.Renderer_Property_BATCHING_ENABLED_get();
110 public Property() : this(NDalicPINVOKE.new_Renderer_Property(), true) {
111 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
114 public static readonly int DEPTH_INDEX = NDalicPINVOKE.Renderer_Property_DEPTH_INDEX_get();
115 public static readonly int FACE_CULLING_MODE = NDalicPINVOKE.Renderer_Property_FACE_CULLING_MODE_get();
116 public static readonly int BLEND_MODE = NDalicPINVOKE.Renderer_Property_BLEND_MODE_get();
117 public static readonly int BLEND_EQUATION_RGB = NDalicPINVOKE.Renderer_Property_BLEND_EQUATION_RGB_get();
118 public static readonly int BLEND_EQUATION_ALPHA = NDalicPINVOKE.Renderer_Property_BLEND_EQUATION_ALPHA_get();
119 public static readonly int BLEND_FACTOR_SRC_RGB = NDalicPINVOKE.Renderer_Property_BLEND_FACTOR_SRC_RGB_get();
120 public static readonly int BLEND_FACTOR_DEST_RGB = NDalicPINVOKE.Renderer_Property_BLEND_FACTOR_DEST_RGB_get();
121 public static readonly int BLEND_FACTOR_SRC_ALPHA = NDalicPINVOKE.Renderer_Property_BLEND_FACTOR_SRC_ALPHA_get();
122 public static readonly int BLEND_FACTOR_DEST_ALPHA = NDalicPINVOKE.Renderer_Property_BLEND_FACTOR_DEST_ALPHA_get();
123 public static readonly int BLEND_COLOR = NDalicPINVOKE.Renderer_Property_BLEND_COLOR_get();
124 public static readonly int BLEND_PRE_MULTIPLIED_ALPHA = NDalicPINVOKE.Renderer_Property_BLEND_PRE_MULTIPLIED_ALPHA_get();
125 public static readonly int INDEX_RANGE_FIRST = NDalicPINVOKE.Renderer_Property_INDEX_RANGE_FIRST_get();
126 public static readonly int INDEX_RANGE_COUNT = NDalicPINVOKE.Renderer_Property_INDEX_RANGE_COUNT_get();
127 public static readonly int DEPTH_WRITE_MODE = NDalicPINVOKE.Renderer_Property_DEPTH_WRITE_MODE_get();
128 public static readonly int DEPTH_FUNCTION = NDalicPINVOKE.Renderer_Property_DEPTH_FUNCTION_get();
129 public static readonly int DEPTH_TEST_MODE = NDalicPINVOKE.Renderer_Property_DEPTH_TEST_MODE_get();
130 public static readonly int RENDER_MODE = NDalicPINVOKE.Renderer_Property_RENDER_MODE_get();
131 public static readonly int STENCIL_FUNCTION = NDalicPINVOKE.Renderer_Property_STENCIL_FUNCTION_get();
132 public static readonly int STENCIL_FUNCTION_MASK = NDalicPINVOKE.Renderer_Property_STENCIL_FUNCTION_MASK_get();
133 public static readonly int STENCIL_FUNCTION_REFERENCE = NDalicPINVOKE.Renderer_Property_STENCIL_FUNCTION_REFERENCE_get();
134 public static readonly int STENCIL_MASK = NDalicPINVOKE.Renderer_Property_STENCIL_MASK_get();
135 public static readonly int STENCIL_OPERATION_ON_FAIL = NDalicPINVOKE.Renderer_Property_STENCIL_OPERATION_ON_FAIL_get();
136 public static readonly int STENCIL_OPERATION_ON_Z_FAIL = NDalicPINVOKE.Renderer_Property_STENCIL_OPERATION_ON_Z_FAIL_get();
137 public static readonly int STENCIL_OPERATION_ON_Z_PASS = NDalicPINVOKE.Renderer_Property_STENCIL_OPERATION_ON_Z_PASS_get();
141 public Renderer (Geometry geometry, Shader shader) : this (NDalicPINVOKE.Renderer_New(Geometry.getCPtr(geometry), Shader.getCPtr(shader)), true) {
142 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
145 public Renderer(Renderer handle) : this(NDalicPINVOKE.new_Renderer__SWIG_1(Renderer.getCPtr(handle)), true) {
146 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
149 public new static Renderer DownCast(BaseHandle handle) {
150 Renderer ret = new Renderer(NDalicPINVOKE.Renderer_DownCast(BaseHandle.getCPtr(handle)), true);
151 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
155 public Renderer Assign(Renderer handle) {
156 Renderer ret = new Renderer(NDalicPINVOKE.Renderer_Assign(swigCPtr, Renderer.getCPtr(handle)), false);
157 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
161 public void SetGeometry(Geometry geometry) {
162 NDalicPINVOKE.Renderer_SetGeometry(swigCPtr, Geometry.getCPtr(geometry));
163 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
166 public Geometry GetGeometry() {
167 Geometry ret = new Geometry(NDalicPINVOKE.Renderer_GetGeometry(swigCPtr), true);
168 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
172 public void SetIndexRange(int firstElement, int elementsCount) {
173 NDalicPINVOKE.Renderer_SetIndexRange(swigCPtr, firstElement, elementsCount);
174 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
177 public void SetTextures(TextureSet textureSet) {
178 NDalicPINVOKE.Renderer_SetTextures(swigCPtr, TextureSet.getCPtr(textureSet));
179 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
182 public TextureSet GetTextures() {
183 TextureSet ret = new TextureSet(NDalicPINVOKE.Renderer_GetTextures(swigCPtr), true);
184 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
188 public void SetShader(Shader shader) {
189 NDalicPINVOKE.Renderer_SetShader(swigCPtr, Shader.getCPtr(shader));
190 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
193 public Shader GetShader() {
194 Shader ret = new Shader(NDalicPINVOKE.Renderer_GetShader(swigCPtr), true);
195 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
199 public int DepthIndex
204 GetProperty( Renderer.Property.DEPTH_INDEX).Get( ref temp );
209 SetProperty( Renderer.Property.DEPTH_INDEX, new Tizen.NUI.PropertyValue( value ) );
212 public int FaceCullingMode
217 GetProperty( Renderer.Property.FACE_CULLING_MODE).Get( ref temp );
222 SetProperty( Renderer.Property.FACE_CULLING_MODE, new Tizen.NUI.PropertyValue( value ) );
230 GetProperty( Renderer.Property.BLEND_MODE).Get( ref temp );
235 SetProperty( Renderer.Property.BLEND_MODE, new Tizen.NUI.PropertyValue( value ) );
238 public int BlendEquationRgb
243 GetProperty( Renderer.Property.BLEND_EQUATION_RGB).Get( ref temp );
248 SetProperty( Renderer.Property.BLEND_EQUATION_RGB, new Tizen.NUI.PropertyValue( value ) );
251 public int BlendEquationAlpha
256 GetProperty( Renderer.Property.BLEND_EQUATION_ALPHA).Get( ref temp );
261 SetProperty( Renderer.Property.BLEND_EQUATION_ALPHA, new Tizen.NUI.PropertyValue( value ) );
264 public int BlendFactorSrcRgb
269 GetProperty( Renderer.Property.BLEND_FACTOR_SRC_RGB).Get( ref temp );
274 SetProperty( Renderer.Property.BLEND_FACTOR_SRC_RGB, new Tizen.NUI.PropertyValue( value ) );
277 public int BlendFactorDestRgb
282 GetProperty( Renderer.Property.BLEND_FACTOR_DEST_RGB).Get( ref temp );
287 SetProperty( Renderer.Property.BLEND_FACTOR_DEST_RGB, new Tizen.NUI.PropertyValue( value ) );
290 public int BlendFactorSrcAlpha
295 GetProperty( Renderer.Property.BLEND_FACTOR_SRC_ALPHA).Get( ref temp );
300 SetProperty( Renderer.Property.BLEND_FACTOR_SRC_ALPHA, new Tizen.NUI.PropertyValue( value ) );
303 public int BlendFactorDestAlpha
308 GetProperty( Renderer.Property.BLEND_FACTOR_DEST_ALPHA).Get( ref temp );
313 SetProperty( Renderer.Property.BLEND_FACTOR_DEST_ALPHA, new Tizen.NUI.PropertyValue( value ) );
316 public Vector4 BlendColor
320 Vector4 temp = new Vector4(0.0f,0.0f,0.0f,0.0f);
321 GetProperty( Renderer.Property.BLEND_COLOR).Get( temp );
326 SetProperty( Renderer.Property.BLEND_COLOR, new Tizen.NUI.PropertyValue( value ) );
329 public bool BlendPreMultipliedAlpha
334 GetProperty( Renderer.Property.BLEND_PRE_MULTIPLIED_ALPHA).Get( ref temp );
339 SetProperty( Renderer.Property.BLEND_PRE_MULTIPLIED_ALPHA, new Tizen.NUI.PropertyValue( value ) );
342 public int IndexRangeFirst
347 GetProperty( Renderer.Property.INDEX_RANGE_FIRST).Get( ref temp );
352 SetProperty( Renderer.Property.INDEX_RANGE_FIRST, new Tizen.NUI.PropertyValue( value ) );
355 public int IndexRangeCount
360 GetProperty( Renderer.Property.INDEX_RANGE_COUNT).Get( ref temp );
365 SetProperty( Renderer.Property.INDEX_RANGE_COUNT, new Tizen.NUI.PropertyValue( value ) );
368 public int DepthWriteMode
373 GetProperty( Renderer.Property.DEPTH_WRITE_MODE).Get( ref temp );
378 SetProperty( Renderer.Property.DEPTH_WRITE_MODE, new Tizen.NUI.PropertyValue( value ) );
381 public int DepthFunction
386 GetProperty( Renderer.Property.DEPTH_FUNCTION).Get( ref temp );
391 SetProperty( Renderer.Property.DEPTH_FUNCTION, new Tizen.NUI.PropertyValue( value ) );
394 public int DepthTestMode
399 GetProperty( Renderer.Property.DEPTH_TEST_MODE).Get( ref temp );
404 SetProperty( Renderer.Property.DEPTH_TEST_MODE, new Tizen.NUI.PropertyValue( value ) );
407 public int RenderMode
412 GetProperty( Renderer.Property.RENDER_MODE).Get( ref temp );
417 SetProperty( Renderer.Property.RENDER_MODE, new Tizen.NUI.PropertyValue( value ) );
420 public int StencilFunction
425 GetProperty( Renderer.Property.STENCIL_FUNCTION).Get( ref temp );
430 SetProperty( Renderer.Property.STENCIL_FUNCTION, new Tizen.NUI.PropertyValue( value ) );
433 public int StencilFunctionMask
438 GetProperty( Renderer.Property.STENCIL_FUNCTION_MASK).Get( ref temp );
443 SetProperty( Renderer.Property.STENCIL_FUNCTION_MASK, new Tizen.NUI.PropertyValue( value ) );
446 public int StencilFunctionReference
451 GetProperty( Renderer.Property.STENCIL_FUNCTION_REFERENCE).Get( ref temp );
456 SetProperty( Renderer.Property.STENCIL_FUNCTION_REFERENCE, new Tizen.NUI.PropertyValue( value ) );
459 public int StencilMask
464 GetProperty( Renderer.Property.STENCIL_MASK).Get( ref temp );
469 SetProperty( Renderer.Property.STENCIL_MASK, new Tizen.NUI.PropertyValue( value ) );
472 public int StencilOperationOnFail
477 GetProperty( Renderer.Property.STENCIL_OPERATION_ON_FAIL).Get( ref temp );
482 SetProperty( Renderer.Property.STENCIL_OPERATION_ON_FAIL, new Tizen.NUI.PropertyValue( value ) );
485 public int StencilOperationOnZFail
490 GetProperty( Renderer.Property.STENCIL_OPERATION_ON_Z_FAIL).Get( ref temp );
495 SetProperty( Renderer.Property.STENCIL_OPERATION_ON_Z_FAIL, new Tizen.NUI.PropertyValue( value ) );
498 public int StencilOperationOnZPass
503 GetProperty( Renderer.Property.STENCIL_OPERATION_ON_Z_PASS).Get( ref temp );
508 SetProperty( Renderer.Property.STENCIL_OPERATION_ON_Z_PASS, new Tizen.NUI.PropertyValue( value ) );