Exemplo n.º 1
0
 /// <summary>
 /// <para>cgMapBuffer maps a buffer into the application's address space for memory-mapped updating of the buffer's data.</para>
 /// <para>The application should call cgUnmapBuffer|cgUnmapBuffer when it's done updating or querying the buffer.</para>
 /// <para>ERROR: CG_INVALID_BUFFER_HANDLE_ERROR is generated if buffer is not a valid buffer. CG_INVALID_ENUMERANT_ERROR is generated if access is not CG_READ_ONLY, CG_WRITE_ONLY, or CG_READ_WRITE. CG_BUFFER_ALREADY_MAPPED_ERROR is generated if buffer is already mapped.</para>
 /// <para>VERSION: cgMapBuffer was introduced in Cg 2.0.</para>
 /// </summary>
 /// <param name="buffer">The buffer which will be mapped into the application's address space.</param>
 /// <param name="access">An enumerant indicating the operations the client may perform on the data store through the pointer while the buffer data is mapped.</param>
 /// <returns>Returns a pointer through which the application can read or write the buffer's data store. Returns NULL if an error occurs.</returns>
 public static IntPtr MapBuffer(CgBuffer buffer, CgBufferAccess access)
 {
     return cgMapBuffer(buffer, access);
 }
Exemplo n.º 2
0
 private static extern IntPtr cgMapBuffer(CgBuffer buffer, CgBufferAccess access);