wgpu-hs-0.4.0.0: WGPU
Safe HaskellNone
LanguageHaskell2010

WGPU.Internal.Buffer

Synopsis

Types

data Buffer Source #

Handle to a buffer.

Instances

Instances details
Eq Buffer Source # 
Instance details

Defined in WGPU.Internal.Buffer

Methods

(==) :: Buffer -> Buffer -> Bool #

(/=) :: Buffer -> Buffer -> Bool #

Show Buffer Source # 
Instance details

Defined in WGPU.Internal.Buffer

ToRaw Buffer WGPUBuffer Source # 
Instance details

Defined in WGPU.Internal.Buffer

data BufferUsage Source #

Different ways you can use a buffer.

Constructors

BufferUsage 

Fields

  • bufMapRead :: !Bool

    Allow a buffer to be mapped for reading.

  • bufMapWrite :: !Bool

    Allow a buffer to be mapped for writing.

  • bufCopySrc :: !Bool

    Allow a buffer to be a source buffer for a copy operation.

  • bufCopyDst :: !Bool

    Allow a buffer to be a destination buffer for a copy operation.

  • bufIndex :: !Bool

    Allow a buffer to be the index buffer in a draw operation.

  • bufVertex :: !Bool

    Allow a buffer to be the vertex buffer in a draw operation.

  • bufUniform :: !Bool

    Allow a buffer to be a uniform binding in a bind group.

  • bufStorage :: !Bool

    Allow a buffer to be a storage binding in a bind group.

  • bufIndirect :: !Bool

    Allow a buffer to be the indirect buffer in an indirect draw call.

Instances

Instances details
Eq BufferUsage Source # 
Instance details

Defined in WGPU.Internal.Buffer

Show BufferUsage Source # 
Instance details

Defined in WGPU.Internal.Buffer

Default BufferUsage Source # 
Instance details

Defined in WGPU.Internal.Buffer

Methods

def :: BufferUsage #

ToRaw BufferUsage Word32 Source # 
Instance details

Defined in WGPU.Internal.Buffer

data BufferDescriptor Source #

Describes a Buffer.

Constructors

BufferDescriptor 

Fields

Functions

createBufferInit Source #

Arguments

:: forall a m. (MonadIO m, ReadableMemoryBuffer a) 
=> Device

Device for which to create the buffer.

-> Text

Debugging label for the buffer.

-> BufferUsage

Usage for the buffer.

-> a

Data to initialize the buffer with.

-> m Buffer

Buffer created with the specified data.

Create a Buffer with data to initialize it.