/// <summary> /// <para>cgCreateBuffer creates a runtime managed Cg buffer object.</para> /// <para>ERROR: CG_INVALID_CONTEXT_HANDLE_ERROR is generated if context is not a valid context.</para> /// <para>VERSION: cgCreateBuffer was introduced in Cg 2.0.</para> /// </summary> /// <param name="context">The context to which the new buffer will be added.</param> /// <param name="size">The length in bytes of the buffer to create.</param> /// <param name="data">Pointer to inital buffer data. NULL will fill the buffer with zero.</param> /// <param name="bufferUsage">Indicates the intended usage method of the buffer.</param> /// <returns>Returns a CgBuffer handle on success. Returns NULL if an error occurs.</returns> public static CgBuffer CreateBuffer(CgContext context, int size, [In]IntPtr data, CgBufferUsage bufferUsage) { return cgCreateBuffer(context, size, data, bufferUsage); }
private static extern CgBuffer cgCreateBuffer(CgContext context, int size, [In] IntPtr data, CgBufferUsage bufferUsage);