public MappingBuffer(BufferTarget bufferTarget, uint bufferObject, MapBufferAccess access) { // TODO: Complete member initialization this.bufferTarget = bufferTarget; this.bufferObject = bufferObject; GL.BindBuffer(bufferTarget, bufferObject); this.BufferPointer = GL.MapBuffer(bufferTarget, access); }
/// <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) { glBindBuffer((uint)this.Target, this.BufferId); } 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); }
/// <summary> /// 把服务端(GPU)上的当前Buffer Object映射到客户端(CPU)的内存上。 /// </summary> /// <param name="target"></param> /// <param name="access"></param> /// <returns></returns> public static IntPtr MapBuffer(BufferTarget target, MapBufferAccess access) { return GetDelegateFor<glMapBuffer>()((uint)target, (uint)access); }
/// <summary> /// The contents of a texture may be made available for shaders to read and write by binding the texture to one of a collection of image units. /// If the texture identified by texture does not have multiple layers or faces, the entire texture level is bound, regardless of the values specified for layered and layer /// </summary> /// <param name="unit">identifies the image unit [0, MAX_IMAGE_UNITS]</param> /// <param name="TextureID">texture is the name of the texture.If texture is zero, any texture currently bound to image unit unit is unbound.</param> /// <param name="level">selects a single level of the texture.</param> /// <param name="layered"> If layered is TRUE, the entire level is bound. If layered is FALSE, only the single layer identified by layer will be bound</param> /// <param name="layer"></param> /// <param name="access">access specifies whether the texture bound to the image will be treated as READ_ONLY, WRITE_ONLY, or READ_WRITE.</param> /// <param name="format">format specifies the format that the elements of the image will be treated as when doing formatted stores</param> public static void BindImageTexture(uint unit, uint TextureID, int level, MapBufferAccess access, SizedInternalFormat format, bool layered = false, int layer = 0) { Delegates.glBindImageTexture(unit, TextureID, level, layered, layer, access, format); }
/// <summary> /// Maps a buffer into client space. /// </summary> /// <param name="target"></param> /// <param name="access"></param> /// <returns></returns> public static IntPtr MapBuffer(BufferTarget target, MapBufferAccess access) { return(Delegates.glMapBuffer(target, access)); }
/// <summary> /// Start to read/write buffer. /// <para>This will returns IntPtr.Zero as this buffer allocates no data in memory.</para> /// </summary> /// <param name="access"></param> /// <param name="bind"></param> /// <returns></returns> public override IntPtr MapBuffer(MapBufferAccess access, bool bind = true) { return(IntPtr.Zero); }
/// <summary> /// 把服务端(GPU)上的当前Buffer Object映射到客户端(CPU)的内存上。 /// </summary> /// <param name="target"></param> /// <param name="access"></param> /// <returns></returns> public static IntPtr MapBuffer(BufferTarget target, MapBufferAccess access) { return(GetDelegateFor <glMapBuffer>()((uint)target, (uint)access)); }
/// <summary> /// Start to read/write buffer. /// <para>This will returns IntPtr.Zero as this buffer allocates no data in memory.</para> /// </summary> /// <param name="access"></param> /// <param name="bind"></param> /// <returns></returns> public override IntPtr MapBuffer(MapBufferAccess access, bool bind = true) { return IntPtr.Zero; }
public static IntPtr MapNamedBufferEXT(uint BufferID, MapBufferAccess access) { return Delegates.glMapNamedBufferEXT(BufferID, access); }
/// <summary> /// Maps a buffer into client space. /// </summary> /// <param name="target"></param> /// <param name="access"></param> /// <returns></returns> public static IntPtr MapBuffer(BufferTarget target, MapBufferAccess access) { return Delegates.glMapBuffer(target, access); }
/// <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; }
public static IntPtr MapNamedBufferEXT(uint BufferID, MapBufferAccess access) { return(Delegates.glMapNamedBufferEXT(BufferID, access)); }