Ejemplo n.º 1
0
        /// <summary>
        /// 为给定VBO执行渲染时所需的操作。
        /// </summary>
        /// <param name="bufferID">用GL.GenBuffers()得到的VBO的ID。</param>
        /// <param name="length">此VBO含有多个个元素?</param>
        internal BufferPtr(uint bufferID, int length, int byteLength)
        {
            if (glBindBuffer == null)
            {
                glBindBuffer    = OpenGL.GetDelegateFor <OpenGL.glBindBuffer>();
                glDeleteBuffers = OpenGL.GetDelegateFor <OpenGL.glDeleteBuffers>();
            }

            this.BufferId   = bufferID;
            this.Length     = length;
            this.ByteLength = byteLength;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 为给定VBO执行渲染时所需的操作。
        /// </summary>
        /// <param name="bufferID">用GL.GenBuffers()得到的VBO的ID。</param>
        /// <param name="length">此VBO含有多个个元素?</param>
        internal BufferPtr(uint bufferID, int length, int byteLength)
        {
            if (glBindBuffer == null)
            {
                glBindBuffer = OpenGL.GetDelegateFor<OpenGL.glBindBuffer>();
                glDeleteBuffers = OpenGL.GetDelegateFor<OpenGL.glDeleteBuffers>();
            }

            this.BufferId = bufferID;
            this.Length = length;
            this.ByteLength = byteLength;
        }