示例#1
0
        /// <summary>
        /// Adds a PropertyBuffer to be used as source of geometry vertices.
        /// </summary>
        /// <param name="vertexBuffer">PropertyBuffer to be used as source of geometry vertices.</param>
        /// <returns>Index of the newly added buffer.</returns>
        /// <since_tizen> 3 </since_tizen>
        public uint AddVertexBuffer(PropertyBuffer vertexBuffer)
        {
            uint ret = Interop.Geometry.AddVertexBuffer(SwigCPtr, PropertyBuffer.getCPtr(vertexBuffer));

            if (NDalicPINVOKE.SWIGPendingException.Pending)
            {
                throw NDalicPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
示例#2
0
        private Geometry CreateQuadGeometry()
        {
            /* Create Property buffer */
            PropertyMap vertexFormat = new PropertyMap();

            vertexFormat.Add("aPosition", new PropertyValue((int)PropertyType.Vector2));

            PropertyBuffer vertexBuffer = new PropertyBuffer(vertexFormat);

            vertexBuffer.SetData(RectangleDataPtr(), 4);


            Geometry geometry = new Geometry();

            geometry.AddVertexBuffer(vertexBuffer);
            geometry.SetType(Geometry.Type.TRIANGLE_STRIP);

            return(geometry);
        }
示例#3
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(PropertyBuffer obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }