vulkan-3.0.0.0: Bindings to the Vulkan graphics API.

Safe HaskellNone
LanguageHaskell2010

Graphics.Vulkan.Core10.Buffer

Synopsis

Documentation

createBuffer :: PokeChain a => Device -> BufferCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> IO Buffer Source #

vkCreateBuffer - Create a new buffer object

Parameters

  • Device is the logical device that creates the buffer object.
  • pCreateInfo is a pointer to a BufferCreateInfo structure containing parameters affecting creation of the buffer.
  • pAllocator controls host memory allocation as described in the Memory Allocation chapter.
  • pBuffer is a pointer to a Buffer handle in which the resulting buffer object is returned.

Valid Usage

Valid Usage (Implicit)

  • pCreateInfo must be a valid pointer to a valid BufferCreateInfo structure
  • If pAllocator is not NULL, pAllocator must be a valid pointer to a valid AllocationCallbacks structure
  • pBuffer must be a valid pointer to a Buffer handle

Return Codes

Success
Failure

See Also

AllocationCallbacks, Buffer, BufferCreateInfo, Device

withBuffer :: PokeChain a => Device -> BufferCreateInfo a -> Maybe AllocationCallbacks -> (Buffer -> IO r) -> IO r Source #

A safe wrapper for createBuffer and destroyBuffer using bracket

The allocated value must not be returned from the provided computation

destroyBuffer :: Device -> Buffer -> ("allocator" ::: Maybe AllocationCallbacks) -> IO () Source #

vkDestroyBuffer - Destroy a buffer object

Parameters

  • Device is the logical device that destroys the buffer.
  • Buffer is the buffer to destroy.
  • pAllocator controls host memory allocation as described in the Memory Allocation chapter.

Valid Usage

  • All submitted commands that refer to Buffer, either directly or via a BufferView, must have completed execution

Valid Usage (Implicit)

Host Synchronization

  • Host access to Buffer must be externally synchronized

See Also

AllocationCallbacks, Buffer, Device

data BufferCreateInfo (es :: [Type]) Source #

VkBufferCreateInfo - Structure specifying the parameters of a newly created buffer object

Valid Usage

  • size must be greater than 0

Valid Usage (Implicit)

See Also

BufferCreateFlags, BufferUsageFlags, DeviceSize, SharingMode, StructureType, createBuffer

Constructors

BufferCreateInfo 

Fields