Safe Haskell | None |
---|---|
Language | Haskell2010 |
Instance of the WGPU API Haskell bindings.
Synopsis
- data Instance
- wgpuHsInstance :: Instance -> WGPUHsInstance
- withPlatformInstance :: MonadIO m => (m Instance -> (Instance -> m ()) -> r) -> r
- withInstance :: forall m r. MonadIO m => FilePath -> (m Instance -> (Instance -> m ()) -> r) -> r
- data LogLevel
- setLogLevel :: MonadIO m => Instance -> LogLevel -> m ()
- connectLog :: MonadIO m => Instance -> m ()
- disconnectLog :: MonadIO m => Instance -> m ()
- data Version = Version {}
- getVersion :: MonadIO m => Instance -> m Version
- versionToText :: Version -> Text
Instance
Instance of the WGPU API.
An instance is loaded from a dynamic library using the withInstance
function.
:: MonadIO m | |
=> (m Instance -> (Instance -> m ()) -> r) | Bracketing function.
This can (for example) be something like |
-> r | Usage or action component of the bracketing function. |
Load the WGPU API from a dynamic library and supply an Instance
to a
program.
This is the same as withInstance
, except that it uses a default,
per-platform name for the library, based on the value returned by
os
.
:: forall m r. MonadIO m | |
=> FilePath | Name of the |
-> (m Instance -> (Instance -> m ()) -> r) | Bracketing function.
This can (for example) be something like |
-> r | Usage or action component of the bracketing function. |
Load the WGPU API from a dynamic library and supply an Instance
to a
program.
Logging
Logging level.
setLogLevel :: MonadIO m => Instance -> LogLevel -> m () Source #
Set the current logging level for the instance.
connectLog :: MonadIO m => Instance -> m () Source #
Connect a stdout logger to the instance.
disconnectLog :: MonadIO m => Instance -> m () Source #
Disconnect a stdout logger from the instance.
Version
Version of WGPU native.