Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data Buffer = Buffer {
- bufferInst :: !Instance
- bufferDevice :: !Device
- wgpuBuffer :: !WGPUBuffer
- data BufferUsage = BufferUsage {
- bufMapRead :: !Bool
- bufMapWrite :: !Bool
- bufCopySrc :: !Bool
- bufCopyDst :: !Bool
- bufIndex :: !Bool
- bufVertex :: !Bool
- bufUniform :: !Bool
- bufStorage :: !Bool
- bufIndirect :: !Bool
- data BufferDescriptor = BufferDescriptor {
- bufferLabel :: !Text
- bufferSize :: !ByteSize
- bufferUsage :: !BufferUsage
- mappedAtCreation :: Bool
- createBuffer :: MonadIO m => Device -> BufferDescriptor -> m Buffer
- createBufferInit :: forall a m. (MonadIO m, ReadableMemoryBuffer a) => Device -> Text -> BufferUsage -> a -> m Buffer
Types
Handle to a buffer.
Buffer | |
|
data BufferUsage Source #
Different ways you can use a buffer.
BufferUsage | |
|
Instances
Eq BufferUsage Source # | |
Defined in WGPU.Internal.Buffer (==) :: BufferUsage -> BufferUsage -> Bool # (/=) :: BufferUsage -> BufferUsage -> Bool # | |
Show BufferUsage Source # | |
Defined in WGPU.Internal.Buffer showsPrec :: Int -> BufferUsage -> ShowS # show :: BufferUsage -> String # showList :: [BufferUsage] -> ShowS # | |
Default BufferUsage Source # | |
Defined in WGPU.Internal.Buffer def :: BufferUsage # | |
ToRaw BufferUsage Word32 Source # | |
Defined in WGPU.Internal.Buffer |
data BufferDescriptor Source #
Describes a Buffer
.
BufferDescriptor | |
|
Instances
Eq BufferDescriptor Source # | |
Defined in WGPU.Internal.Buffer (==) :: BufferDescriptor -> BufferDescriptor -> Bool # (/=) :: BufferDescriptor -> BufferDescriptor -> Bool # | |
Show BufferDescriptor Source # | |
Defined in WGPU.Internal.Buffer showsPrec :: Int -> BufferDescriptor -> ShowS # show :: BufferDescriptor -> String # showList :: [BufferDescriptor] -> ShowS # | |
ToRaw BufferDescriptor WGPUBufferDescriptor Source # | |
Defined in WGPU.Internal.Buffer raw :: BufferDescriptor -> ContT r IO WGPUBufferDescriptor Source # |
Functions
createBuffer :: MonadIO m => Device -> BufferDescriptor -> m Buffer Source #
Create a Buffer
.
:: 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.