示例#1
0
        /// <summary>
        /// Unbind this BufferObject.
        /// </summary>
        internal override void Unbind(GraphicsContext ctx)
        {
            if (ctx == null)
            {
                throw new ArgumentNullException("ctx");
            }

            if (ctx.Caps.GlExtensions.TransformFeedback2_ARB)
            {
                // Bind this  feedback buffer
                Gl.BindTransformFeedback(Gl.TRANSFORM_FEEDBACK, 0);
            }
#if false
            else
            {
                // Manually map buffer objects
                foreach (KeyValuePair <uint, ArrayAttachment> pair in mAttachedArrays)
                {
                    Gl.BindBufferBase(Gl.TRANSFORM_FEEDBACK_BUFFER, pair.Key, 0);
                    RenderException.DebugCheckErrors();
                }
            }
#endif
        }