Ejemplo n.º 1
0
        /// <summary>
        /// Fill vertex data into the provided memory array (VBO after MapBuffer).
        /// </summary>
        /// <param name="ptr">Memory pointer</param>
        /// <param name="normals">Use normal vectors?</param>
        /// <param name="colors">Use vertex colors?</param>
        /// <param name="txtcoord">Use texture coordinates?</param>
        /// <returns>Stride (vertex size) in bytes</returns>
        public unsafe int FillVertexBuffer(float *ptr, bool normals, bool colors, bool txtcoord)
        {
            // !!!{{ TODO: put your buffer-fill code here

            if (result == null)
            {
                return(0);
            }

            // Trivial solution: use all the working-scene vertices..
            // Not the case => rewrite the code!
            return(result.FillVertexBuffer(ptr, true, txtcoord, colors, normals));

            // !!!}}
        }