/// <summary> /// Start to read/write buffer. /// </summary> /// <param name="access"></param> /// <param name="bind"></param> /// <returns></returns> public virtual IntPtr MapBuffer(MapBufferAccess access, bool bind = true) { if (bind) { if (glBindBuffer == null) { glBindBuffer = OpenGL.GetDelegateFor <OpenGL.glBindBuffer>(); } glBindBuffer((uint)this.Target, this.BufferId); } if (glMapBuffer == null) { glMapBuffer = OpenGL.GetDelegateFor <OpenGL.glMapBuffer>(); } IntPtr pointer = glMapBuffer((uint)this.Target, (uint)access); return(pointer); }
/// <summary> /// Start to read/write buffer. /// </summary> /// <param name="access"></param> /// <param name="bind"></param> /// <returns></returns> public virtual IntPtr MapBuffer(MapBufferAccess access, bool bind = true) { if (bind) { if (glBindBuffer == null) { glBindBuffer = OpenGL.GetDelegateFor<OpenGL.glBindBuffer>(); } glBindBuffer((uint)this.Target, this.BufferId); } if (glMapBuffer == null) { glMapBuffer = OpenGL.GetDelegateFor<OpenGL.glMapBuffer>(); } IntPtr pointer = glMapBuffer((uint)this.Target, (uint)access); return pointer; }