wgpu-hs-0.4.0.0: WGPU
Safe HaskellNone
LanguageHaskell2010

WGPU.Internal.Instance

Description

Instance of the WGPU API Haskell bindings.

Synopsis

Instance

data Instance Source #

Instance of the WGPU API.

An instance is loaded from a dynamic library using the withInstance function.

Instances

Instances details
Show Instance Source # 
Instance details

Defined in WGPU.Internal.Instance

ToRaw Instance WGPUHsInstance Source # 
Instance details

Defined in WGPU.Internal.Instance

withPlatformInstance Source #

Arguments

:: MonadIO m 
=> (m Instance -> (Instance -> m ()) -> r)

Bracketing function. This can (for example) be something like bracket.

-> 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.

withInstance Source #

Arguments

:: forall m r. MonadIO m 
=> FilePath

Name of the wgpu-native dynamic library, or a complete path to it.

-> (m Instance -> (Instance -> m ()) -> r)

Bracketing function. This can (for example) be something like bracket.

-> 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

data LogLevel Source #

Logging level.

Constructors

Trace 
Debug 
Info 
Warn 
Error 

Instances

Instances details
Eq LogLevel Source # 
Instance details

Defined in WGPU.Internal.Instance

Show LogLevel Source # 
Instance details

Defined in WGPU.Internal.Instance

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

data Version Source #

Version of WGPU native.

Constructors

Version 

Fields

Instances

Instances details
Eq Version Source # 
Instance details

Defined in WGPU.Internal.Instance

Methods

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

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

Show Version Source # 
Instance details

Defined in WGPU.Internal.Instance

getVersion :: MonadIO m => Instance -> m Version Source #

Return the exact version of the WGPU native instance.

versionToText :: Version -> Text Source #

Convert a Version value to a text string.

>>> versionToText (Version 0 9 2 2)
"v0.9.2.2"