Example #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SharpDX.Direct3D9.VertexBuffer" /> class.
 /// </summary>
 /// <param name="device">The device that will be used to create the buffer.</param>
 /// <param name="sizeInBytes">Size of the buffer, in bytes.</param>
 /// <param name="usage">The requested usage of the buffer.</param>
 /// <param name="format">The vertex format of the vertices in the buffer. If set to <see cref="SharpDX.Direct3D9.VertexFormat" />.None, the buffer will be a non-FVF buffer.</param>
 /// <param name="pool">The memory class into which the resource will be placed.</param>
 /// <param name="sharedHandle">The variable that will receive the shared handle for this resource.</param>
 /// <remarks>This method is only available in Direct3D9 Ex.</remarks>
 /// <msdn-id>bb174364</msdn-id>	
 /// <unmanaged>HRESULT IDirect3DDevice9::CreateVertexBuffer([In] unsigned int Length,[In] D3DUSAGE Usage,[In] D3DFVF FVF,[In] D3DPOOL Pool,[Out, Fast] IDirect3DVertexBuffer9** ppVertexBuffer,[In] void** pSharedHandle)</unmanaged>	
 /// <unmanaged-short>IDirect3DDevice9::CreateVertexBuffer</unmanaged-short>	
 public VertexBuffer(Device device, int sizeInBytes, Usage usage, VertexFormat format, Pool pool, ref IntPtr sharedHandle)
     : base(IntPtr.Zero)
 {
     unsafe
     {
         sharedHandle = IntPtr.Zero;
         fixed (void* pSharedHandle = &sharedHandle)
             device.CreateVertexBuffer(sizeInBytes, usage, format, pool, this, new IntPtr(pSharedHandle));
     }
 }
Example #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SharpDX.Direct3D9.VertexBuffer" /> class.
        /// </summary>
        /// <param name="device">The device that will be used to create the buffer.</param>
        /// <param name="sizeInBytes">Size of the buffer, in bytes.</param>
        /// <param name="usage">The requested usage of the buffer.</param>
        /// <param name="format">The vertex format of the vertices in the buffer. If set to <see cref="SharpDX.Direct3D9.VertexFormat" />.None, the buffer will be a non-FVF buffer.</param>
        /// <param name="pool">The memory class into which the resource will be placed.</param>
        /// <param name="sharedHandle">The variable that will receive the shared handle for this resource.</param>
        /// <remarks>This method is only available in Direct3D9 Ex.</remarks>
        /// <msdn-id>bb174364</msdn-id>
        /// <unmanaged>HRESULT IDirect3DDevice9::CreateVertexBuffer([In] unsigned int Length,[In] D3DUSAGE Usage,[In] D3DFVF FVF,[In] D3DPOOL Pool,[Out, Fast] IDirect3DVertexBuffer9** ppVertexBuffer,[In] void** pSharedHandle)</unmanaged>
        /// <unmanaged-short>IDirect3DDevice9::CreateVertexBuffer</unmanaged-short>
        public VertexBuffer(Device device, int sizeInBytes, Usage usage, VertexFormat format, Pool pool, ref IntPtr sharedHandle)
            : base(IntPtr.Zero)
        {
            unsafe
            {
                sharedHandle = IntPtr.Zero;

                fixed(void *pSharedHandle = &sharedHandle)
                device.CreateVertexBuffer(sizeInBytes, usage, format, pool, this, new IntPtr(pSharedHandle));
            }
        }
Example #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SharpDX.Direct3D9.VertexBuffer" /> class.
 /// </summary>
 /// <param name="device">The device that will be used to create the buffer.</param>
 /// <param name="sizeInBytes">Size of the buffer, in bytes.</param>
 /// <param name="usage">The requested usage of the buffer.</param>
 /// <param name="format">The vertex format of the vertices in the buffer. If set to <see cref="SharpDX.Direct3D9.VertexFormat" />.None, the buffer will be a non-FVF buffer.</param>
 /// <param name="pool">The memory class into which the resource will be placed.</param>
 /// <msdn-id>bb174364</msdn-id>	
 /// <unmanaged>HRESULT IDirect3DDevice9::CreateVertexBuffer([In] unsigned int Length,[In] D3DUSAGE Usage,[In] D3DFVF FVF,[In] D3DPOOL Pool,[Out, Fast] IDirect3DVertexBuffer9** ppVertexBuffer,[In] void** pSharedHandle)</unmanaged>	
 /// <unmanaged-short>IDirect3DDevice9::CreateVertexBuffer</unmanaged-short>	
 public VertexBuffer(Device device, int sizeInBytes, Usage usage, VertexFormat format, Pool pool)
     : base(IntPtr.Zero)
 {
     device.CreateVertexBuffer(sizeInBytes, usage, format, pool, this, IntPtr.Zero);
 }
Example #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SharpDX.Direct3D9.VertexBuffer" /> class.
 /// </summary>
 /// <param name="device">The device that will be used to create the buffer.</param>
 /// <param name="sizeInBytes">Size of the buffer, in bytes.</param>
 /// <param name="usage">The requested usage of the buffer.</param>
 /// <param name="format">The vertex format of the vertices in the buffer. If set to <see cref="SharpDX.Direct3D9.VertexFormat" />.None, the buffer will be a non-FVF buffer.</param>
 /// <param name="pool">The memory class into which the resource will be placed.</param>
 /// <msdn-id>bb174364</msdn-id>
 /// <unmanaged>HRESULT IDirect3DDevice9::CreateVertexBuffer([In] unsigned int Length,[In] D3DUSAGE Usage,[In] D3DFVF FVF,[In] D3DPOOL Pool,[Out, Fast] IDirect3DVertexBuffer9** ppVertexBuffer,[In] void** pSharedHandle)</unmanaged>
 /// <unmanaged-short>IDirect3DDevice9::CreateVertexBuffer</unmanaged-short>
 public VertexBuffer(Device device, int sizeInBytes, Usage usage, VertexFormat format, Pool pool)
     : base(IntPtr.Zero)
 {
     device.CreateVertexBuffer(sizeInBytes, usage, format, pool, this, IntPtr.Zero);
 }