1 /** Copyright (c) 2016 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;
44 public override void Dispose() {
46 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
49 NDalicPINVOKE.delete_Renderer(swigCPtr);
51 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
53 global::System.GC.SuppressFinalize(this);
58 public class Property : global::System.IDisposable {
59 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
60 protected bool swigCMemOwn;
62 internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) {
63 swigCMemOwn = cMemoryOwn;
64 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
67 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) {
68 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
75 public virtual void Dispose() {
77 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
80 NDalicPINVOKE.delete_Renderer_Property(swigCPtr);
82 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
84 global::System.GC.SuppressFinalize(this);
88 public Property() : this(NDalicPINVOKE.new_Renderer_Property(), true) {
89 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
92 public static readonly int DEPTH_INDEX = NDalicPINVOKE.Renderer_Property_DEPTH_INDEX_get();
93 public static readonly int FACE_CULLING_MODE = NDalicPINVOKE.Renderer_Property_FACE_CULLING_MODE_get();
94 public static readonly int BLEND_MODE = NDalicPINVOKE.Renderer_Property_BLEND_MODE_get();
95 public static readonly int BLEND_EQUATION_RGB = NDalicPINVOKE.Renderer_Property_BLEND_EQUATION_RGB_get();
96 public static readonly int BLEND_EQUATION_ALPHA = NDalicPINVOKE.Renderer_Property_BLEND_EQUATION_ALPHA_get();
97 public static readonly int BLEND_FACTOR_SRC_RGB = NDalicPINVOKE.Renderer_Property_BLEND_FACTOR_SRC_RGB_get();
98 public static readonly int BLEND_FACTOR_DEST_RGB = NDalicPINVOKE.Renderer_Property_BLEND_FACTOR_DEST_RGB_get();
99 public static readonly int BLEND_FACTOR_SRC_ALPHA = NDalicPINVOKE.Renderer_Property_BLEND_FACTOR_SRC_ALPHA_get();
100 public static readonly int BLEND_FACTOR_DEST_ALPHA = NDalicPINVOKE.Renderer_Property_BLEND_FACTOR_DEST_ALPHA_get();
101 public static readonly int BLEND_COLOR = NDalicPINVOKE.Renderer_Property_BLEND_COLOR_get();
102 public static readonly int BLEND_PRE_MULTIPLIED_ALPHA = NDalicPINVOKE.Renderer_Property_BLEND_PRE_MULTIPLIED_ALPHA_get();
103 public static readonly int INDEX_RANGE_FIRST = NDalicPINVOKE.Renderer_Property_INDEX_RANGE_FIRST_get();
104 public static readonly int INDEX_RANGE_COUNT = NDalicPINVOKE.Renderer_Property_INDEX_RANGE_COUNT_get();
105 public static readonly int DEPTH_WRITE_MODE = NDalicPINVOKE.Renderer_Property_DEPTH_WRITE_MODE_get();
106 public static readonly int DEPTH_FUNCTION = NDalicPINVOKE.Renderer_Property_DEPTH_FUNCTION_get();
107 public static readonly int DEPTH_TEST_MODE = NDalicPINVOKE.Renderer_Property_DEPTH_TEST_MODE_get();
108 public static readonly int RENDER_MODE = NDalicPINVOKE.Renderer_Property_RENDER_MODE_get();
109 public static readonly int STENCIL_FUNCTION = NDalicPINVOKE.Renderer_Property_STENCIL_FUNCTION_get();
110 public static readonly int STENCIL_FUNCTION_MASK = NDalicPINVOKE.Renderer_Property_STENCIL_FUNCTION_MASK_get();
111 public static readonly int STENCIL_FUNCTION_REFERENCE = NDalicPINVOKE.Renderer_Property_STENCIL_FUNCTION_REFERENCE_get();
112 public static readonly int STENCIL_MASK = NDalicPINVOKE.Renderer_Property_STENCIL_MASK_get();
113 public static readonly int STENCIL_OPERATION_ON_FAIL = NDalicPINVOKE.Renderer_Property_STENCIL_OPERATION_ON_FAIL_get();
114 public static readonly int STENCIL_OPERATION_ON_Z_FAIL = NDalicPINVOKE.Renderer_Property_STENCIL_OPERATION_ON_Z_FAIL_get();
115 public static readonly int STENCIL_OPERATION_ON_Z_PASS = NDalicPINVOKE.Renderer_Property_STENCIL_OPERATION_ON_Z_PASS_get();
116 public static readonly int BATCHING_ENABLED = NDalicPINVOKE.Renderer_Property_BATCHING_ENABLED_get();
120 public Renderer (Geometry geometry, Shader shader) : this (NDalicPINVOKE.Renderer_New(Geometry.getCPtr(geometry), Shader.getCPtr(shader)), true) {
121 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
124 public Renderer(Renderer handle) : this(NDalicPINVOKE.new_Renderer__SWIG_1(Renderer.getCPtr(handle)), true) {
125 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
128 public new static Renderer DownCast(BaseHandle handle) {
129 Renderer ret = new Renderer(NDalicPINVOKE.Renderer_DownCast(BaseHandle.getCPtr(handle)), true);
130 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
134 public Renderer Assign(Renderer handle) {
135 Renderer ret = new Renderer(NDalicPINVOKE.Renderer_Assign(swigCPtr, Renderer.getCPtr(handle)), false);
136 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
140 public void SetGeometry(Geometry geometry) {
141 NDalicPINVOKE.Renderer_SetGeometry(swigCPtr, Geometry.getCPtr(geometry));
142 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
145 public Geometry GetGeometry() {
146 Geometry ret = new Geometry(NDalicPINVOKE.Renderer_GetGeometry(swigCPtr), true);
147 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
151 public void SetIndexRange(int firstElement, int elementsCount) {
152 NDalicPINVOKE.Renderer_SetIndexRange(swigCPtr, firstElement, elementsCount);
153 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
156 public void SetTextures(TextureSet textureSet) {
157 NDalicPINVOKE.Renderer_SetTextures(swigCPtr, TextureSet.getCPtr(textureSet));
158 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
161 public TextureSet GetTextures() {
162 TextureSet ret = new TextureSet(NDalicPINVOKE.Renderer_GetTextures(swigCPtr), true);
163 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
167 public void SetShader(Shader shader) {
168 NDalicPINVOKE.Renderer_SetShader(swigCPtr, Shader.getCPtr(shader));
169 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
172 public Shader GetShader() {
173 Shader ret = new Shader(NDalicPINVOKE.Renderer_GetShader(swigCPtr), true);
174 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
178 public int DepthIndex
183 GetProperty( Renderer.Property.DEPTH_INDEX).Get( ref temp );
188 SetProperty( Renderer.Property.DEPTH_INDEX, new Dali.Property.Value( value ) );
191 public int FaceCullingMode
196 GetProperty( Renderer.Property.FACE_CULLING_MODE).Get( ref temp );
201 SetProperty( Renderer.Property.FACE_CULLING_MODE, new Dali.Property.Value( value ) );
209 GetProperty( Renderer.Property.BLEND_MODE).Get( ref temp );
214 SetProperty( Renderer.Property.BLEND_MODE, new Dali.Property.Value( value ) );
217 public int BlendEquationRgb
222 GetProperty( Renderer.Property.BLEND_EQUATION_RGB).Get( ref temp );
227 SetProperty( Renderer.Property.BLEND_EQUATION_RGB, new Dali.Property.Value( value ) );
230 public int BlendEquationAlpha
235 GetProperty( Renderer.Property.BLEND_EQUATION_ALPHA).Get( ref temp );
240 SetProperty( Renderer.Property.BLEND_EQUATION_ALPHA, new Dali.Property.Value( value ) );
243 public int BlendFactorSrcRgb
248 GetProperty( Renderer.Property.BLEND_FACTOR_SRC_RGB).Get( ref temp );
253 SetProperty( Renderer.Property.BLEND_FACTOR_SRC_RGB, new Dali.Property.Value( value ) );
256 public int BlendFactorDestRgb
261 GetProperty( Renderer.Property.BLEND_FACTOR_DEST_RGB).Get( ref temp );
266 SetProperty( Renderer.Property.BLEND_FACTOR_DEST_RGB, new Dali.Property.Value( value ) );
269 public int BlendFactorSrcAlpha
274 GetProperty( Renderer.Property.BLEND_FACTOR_SRC_ALPHA).Get( ref temp );
279 SetProperty( Renderer.Property.BLEND_FACTOR_SRC_ALPHA, new Dali.Property.Value( value ) );
282 public int BlendFactorDestAlpha
287 GetProperty( Renderer.Property.BLEND_FACTOR_DEST_ALPHA).Get( ref temp );
292 SetProperty( Renderer.Property.BLEND_FACTOR_DEST_ALPHA, new Dali.Property.Value( value ) );
295 public Vector4 BlendColor
299 Vector4 temp = new Vector4(0.0f,0.0f,0.0f,0.0f);
300 GetProperty( Renderer.Property.BLEND_COLOR).Get( temp );
305 SetProperty( Renderer.Property.BLEND_COLOR, new Dali.Property.Value( value ) );
308 public bool BlendPreMultipliedAlpha
313 GetProperty( Renderer.Property.BLEND_PRE_MULTIPLIED_ALPHA).Get( ref temp );
318 SetProperty( Renderer.Property.BLEND_PRE_MULTIPLIED_ALPHA, new Dali.Property.Value( value ) );
321 public int IndexRangeFirst
326 GetProperty( Renderer.Property.INDEX_RANGE_FIRST).Get( ref temp );
331 SetProperty( Renderer.Property.INDEX_RANGE_FIRST, new Dali.Property.Value( value ) );
334 public int IndexRangeCount
339 GetProperty( Renderer.Property.INDEX_RANGE_COUNT).Get( ref temp );
344 SetProperty( Renderer.Property.INDEX_RANGE_COUNT, new Dali.Property.Value( value ) );
347 public int DepthWriteMode
352 GetProperty( Renderer.Property.DEPTH_WRITE_MODE).Get( ref temp );
357 SetProperty( Renderer.Property.DEPTH_WRITE_MODE, new Dali.Property.Value( value ) );
360 public int DepthFunction
365 GetProperty( Renderer.Property.DEPTH_FUNCTION).Get( ref temp );
370 SetProperty( Renderer.Property.DEPTH_FUNCTION, new Dali.Property.Value( value ) );
373 public int DepthTestMode
378 GetProperty( Renderer.Property.DEPTH_TEST_MODE).Get( ref temp );
383 SetProperty( Renderer.Property.DEPTH_TEST_MODE, new Dali.Property.Value( value ) );
386 public int RenderMode
391 GetProperty( Renderer.Property.RENDER_MODE).Get( ref temp );
396 SetProperty( Renderer.Property.RENDER_MODE, new Dali.Property.Value( value ) );
399 public int StencilFunction
404 GetProperty( Renderer.Property.STENCIL_FUNCTION).Get( ref temp );
409 SetProperty( Renderer.Property.STENCIL_FUNCTION, new Dali.Property.Value( value ) );
412 public int StencilFunctionMask
417 GetProperty( Renderer.Property.STENCIL_FUNCTION_MASK).Get( ref temp );
422 SetProperty( Renderer.Property.STENCIL_FUNCTION_MASK, new Dali.Property.Value( value ) );
425 public int StencilFunctionReference
430 GetProperty( Renderer.Property.STENCIL_FUNCTION_REFERENCE).Get( ref temp );
435 SetProperty( Renderer.Property.STENCIL_FUNCTION_REFERENCE, new Dali.Property.Value( value ) );
438 public int StencilMask
443 GetProperty( Renderer.Property.STENCIL_MASK).Get( ref temp );
448 SetProperty( Renderer.Property.STENCIL_MASK, new Dali.Property.Value( value ) );
451 public int StencilOperationOnFail
456 GetProperty( Renderer.Property.STENCIL_OPERATION_ON_FAIL).Get( ref temp );
461 SetProperty( Renderer.Property.STENCIL_OPERATION_ON_FAIL, new Dali.Property.Value( value ) );
464 public int StencilOperationOnZFail
469 GetProperty( Renderer.Property.STENCIL_OPERATION_ON_Z_FAIL).Get( ref temp );
474 SetProperty( Renderer.Property.STENCIL_OPERATION_ON_Z_FAIL, new Dali.Property.Value( value ) );
477 public int StencilOperationOnZPass
482 GetProperty( Renderer.Property.STENCIL_OPERATION_ON_Z_PASS).Get( ref temp );
487 SetProperty( Renderer.Property.STENCIL_OPERATION_ON_Z_PASS, new Dali.Property.Value( value ) );
490 public bool BatchingEnabled
495 GetProperty( Renderer.Property.BATCHING_ENABLED).Get( ref temp );
500 SetProperty( Renderer.Property.BATCHING_ENABLED, new Dali.Property.Value( value ) );