Ejemplo n.º 1
0
        /// <summary>
        /// Map the GPU buffer allocated by this BufferObject.
        /// </summary>
        /// <param name="ctx">
        /// A <see cref="GraphicsContext"/> required for mapping this BufferObject.
        /// </param>
        /// <param name="mask">
        /// A <see cref="BufferAccessARB"/> that specify the map access.
        /// </param>
        /// <exception cref="InvalidOperationException">
        /// Exception thrown if this BufferObject is already mapped.
        /// </exception>
        /// <exception cref="InvalidOperationException">
        /// Exception thrown if this BufferObject does not exist for <paramref name="ctx"/>.
        /// </exception>
        /// <remarks>
        /// <para>
        /// After being mapped, the mapped buffer is accessible via <see cref="MapGet{T}(GraphicsContext, long)"/> or
        /// <see cref="MapSet{T}(GraphicsContext, T, long)"/>, or via <see cref="MappedBuffer"/> as raw pointer.
        /// </para>
        /// </remarks>
        public void Map(GraphicsContext ctx, BufferAccessARB mask)
        {
            CheckThisExistence(ctx);

            Debug.Assert(ctx.Caps.GlExtensions.VertexBufferObject_ARB || _GpuBuffer != null);
            // Map GPU buffer (actual or fake)
            _MappedBuffer = ctx.Caps.GlExtensions.VertexBufferObject_ARB ? Gl.MapBuffer(BufferType, mask) : _GpuBuffer.AlignedBuffer;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Map the GPU buffer allocated by this BufferObject.
        /// </summary>
        /// <param name="ctx">
        /// A <see cref="GraphicsContext"/> required for mapping this BufferObject.
        /// </param>
        /// <param name="mask">
        /// A <see cref="BufferAccessARB"/> that specify the map access.
        /// </param>
        /// <exception cref="InvalidOperationException">
        /// Exception thrown if this BufferObject is already mapped.
        /// </exception>
        /// <exception cref="InvalidOperationException">
        /// Exception thrown if this BufferObject does not exist for <paramref name="ctx"/>.
        /// </exception>
        /// <remarks>
        /// <para>
        /// After being mapped, the mapped buffer is accessible via <see cref="MapGet{T}(GraphicsContext, long)"/> or
        /// <see cref="MapSet{T}(GraphicsContext, T, long)"/>, or via <see cref="MappedBuffer"/> as raw pointer.
        /// </para>
        /// </remarks>
        public void Map(GraphicsContext ctx, BufferAccessARB mask)
        {
            CheckThisExistence(ctx);

            Debug.Assert(ctx.Extensions.VertexBufferObject_ARB || _GpuBuffer != null);
            if (ctx.Extensions.VertexBufferObject_ARB)
            {
                BindCore(ctx);

                _MappedBuffer = Gl.MapBuffer(BufferType, mask);
            }
            else
            {
                _MappedBuffer = _GpuBuffer.AlignedBuffer;
            }
        }
Ejemplo n.º 3
0
 public abstract unsafe void *MapBuffer([Flow(FlowDirection.In)] BufferTargetARB target, [Flow(FlowDirection.In)] BufferAccessARB access);
Ejemplo n.º 4
0
 public partial void BindImageTexture([Flow(FlowDirection.In)] uint index, [Flow(FlowDirection.In)] uint texture, [Flow(FlowDirection.In)] int level, [Flow(FlowDirection.In)] bool layered, [Flow(FlowDirection.In)] int layer, [Flow(FlowDirection.In)] BufferAccessARB access, [Flow(FlowDirection.In)] int format);
Ejemplo n.º 5
0
		public static IntPtr MapBuffer(BufferTargetARB target, BufferAccessARB access)
		{
			IntPtr retValue;

			Debug.Assert(Delegates.pglMapBuffer != null, "pglMapBuffer not implemented");
			retValue = Delegates.pglMapBuffer((Int32)target, (Int32)access);
			LogFunction("glMapBuffer({0}, {1}) = {2}", target, access, retValue.ToString("X8"));
			DebugCheckErrors(retValue);

			return (retValue);
		}
Ejemplo n.º 6
0
 public unsafe partial void *MapBuffer([Flow(FlowDirection.In)] BufferTargetARB target, [Flow(FlowDirection.In)] BufferAccessARB access);
Ejemplo n.º 7
0
 public abstract void BindImageTexture([Flow(FlowDirection.In)] uint unit, [Flow(FlowDirection.In)] uint texture, [Flow(FlowDirection.In)] int level, [Flow(FlowDirection.In)] bool layered, [Flow(FlowDirection.In)] int layer, [Flow(FlowDirection.In)] BufferAccessARB access, [Flow(FlowDirection.In)] InternalFormat format);
 public partial void BindImageTexture([Flow(FlowDirection.In)] uint unit, [Flow(FlowDirection.In)] uint texture, [Flow(FlowDirection.In)] int level, [Flow(FlowDirection.In)] Boolean layered, [Flow(FlowDirection.In)] int layer, [Flow(FlowDirection.In)] BufferAccessARB access, [Flow(FlowDirection.In)] InternalFormat format);