wgpu-hs-0.3.0.0: WGPU
Safe HaskellNone
LanguageHaskell2010

WGPU.Classy

Description

WGPU commands commonly take parameters such as the Instance, Device, etc, which are relatively unchanged across multiple commands. This module provides a way to supply those parameters from a MonadReader. Useful for the truly lazy among us.

Synopsis

Constraints

type HasInstance r m = (RIO r m, Has Instance r) Source #

type HasSurface r m = (RIO r m, Has Surface r) Source #

type HasAdapter r m = (RIO r m, Has Adapter r) Source #

type HasDevice r m = (RIO r m, Has Device r) Source #

type HasSwapChain r m = (RIO r m, Has SwapChain r) Source #

type HasCommandEncoder r m = (RIO r m, Has CommandEncoder r) Source #

type HasQueue r m = (RIO r m, Has Queue r) Source #

Classes

Lifted Functions

Adapter

Device

Swapchain

Resource Binding

Shader Modules

Pipelines

Render

Command Encoding

Queue

queueSubmit' :: HasDevice r m => Vector CommandBuffer -> m () Source #

Fetch the queue from a device and submit command buffers to it.

Version

Logging

Reader Contexts

addEnv :: MonadReader r m => q -> ReaderT (q, r) m a -> m a Source #

Add q into the reader environment.

Building

Command Encoding

buildCommandBuffer Source #

Arguments

:: forall r m. HasDevice r m 
=> Text

Debugging label for the command encoder.

-> Text

Debugging label for the command buffer.

-> ReaderT (CommandEncoder, r) m ()

Action to configure the CommandEncoder.

-> m CommandBuffer

Completed CommandBuffer.

Build a CommandBuffer by running actions in an environment that has access to a CommandEncoder.

buildRenderPass :: forall r m. HasCommandEncoder r m => RenderPassDescriptor -> ReaderT (RenderPassEncoder, r) m () -> m () Source #

Build a render pass by running actions in an environment that has access to a RenderPassEncoder.