public static void BindBuffersRange(BufferProgramTarget target, int first, uint[] buffers, IntPtr[] Offsets, IntPtr[] Sizes) { var count = Math.Min(buffers.Length, Math.Min(Offsets.Length, Sizes.Length)); Delegates.glBindBuffersRange(target, first, count, ref buffers[0], ref Offsets[0], ref Sizes[0]); }
//ARB_multi_bind' /// <summary> /// Binds an array of buffer ids to a bindingindex of target type starting at first. /// </summary> /// <param name="target">The sets or type of bindingindexes to bind to.</param> /// <param name="first">First Bindingindex to start binding at.</param> /// <param name="buffers">Array of buffer ids to bind.</param> public static void BindBuffersBase(BufferProgramTarget target, int first, uint[] buffers) { //Delegates.glBindBufferBase(target, bindingIndex, BufferId) Delegates.glBindBuffersBase(target, first, buffers.Length, ref buffers[0]); }
/// <summary> /// Resets a range of bindingindexes to no buffer. /// </summary> /// <param name="target">Which sets of binding indexes to set to zero?</param> /// <param name="first">first BindingIndex to reset.</param> /// <param name="count">Number of bindingindexes to reset.</param> public static void BindBuffersBase(BufferProgramTarget target, int first, int count) { var tmp = new uint[count]; Delegates.glBindBuffersBase(target, first, tmp.Length, ref tmp[0]); }
/// <summary> /// Binds a buffer to a bindingindex on current bound program. /// Note that there are separate ranges of bindingindexes dependent on which target you bind. /// Aka UniformBuffertarget and index 0 is not the same as ShaderStorageTarget and index 0. /// </summary> /// <param name="target">The target on current bound program to bind buffer at.</param> /// <param name="bindingIndex">The bindingindex of target type to bind to.</param> /// <param name="BufferId">The id of the buffer to bind.</param> public static void BindBufferBase(BufferProgramTarget target, uint bindingIndex, uint BufferId) { Delegates.glBindBufferBase(target, bindingIndex, BufferId); }
/// <summary> /// Binds a range/region in a buffer to a bindingindex on current bound program. /// Note that there are separate ranges of bindingindexes dependent on which target you bind. /// Aka UniformBuffertarget and index 0 is not the same as ShaderStorageTarget and index 0. /// </summary> /// <param name="target">The target on current bound program to bind buffer at.</param> /// <param name="bindingIndex">The bindingindex of target type to bind to.</param> /// <param name="BufferId">The id of the buffer to bind.</param> /// <param name="Offset">Offset in bytes from start of buffer to start of range.</param> /// <param name="Size">Size in bytes from start of range to end of range.</param> public static void BindBufferRange(BufferProgramTarget target, uint bindingIndex, uint BufferId, long Offset, long Size) { Delegates.glBindBufferRange(target, bindingIndex, BufferId, (IntPtr)Offset, (IntPtr)Size); }