コード例 #1
0
ファイル: BufferObject.cs プロジェクト: vazgriz/OpenGL.Net
        /// <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;
        }
コード例 #2
0
ファイル: BufferObject.cs プロジェクト: vipyami/OpenGL.Net
        /// <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;
            }
        }
コード例 #3
0
 public abstract unsafe void *MapBuffer([Flow(FlowDirection.In)] BufferTargetARB target, [Flow(FlowDirection.In)] BufferAccessARB access);
コード例 #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);
コード例 #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);
		}
コード例 #6
0
 public unsafe partial void *MapBuffer([Flow(FlowDirection.In)] BufferTargetARB target, [Flow(FlowDirection.In)] BufferAccessARB access);
コード例 #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);
コード例 #8
0
 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);