wgpu-hs-0.4.0.0: WGPU
Safe HaskellNone
LanguageHaskell2010

WGPU.Internal.RenderPass

Description

 
Synopsis

Types

data LoadOp a Source #

Operation to perform to the output attachment at the start of a render pass.

Constructors

LoadOpClear !a

Clear with the specified color value.

LoadOpLoad

Load from memory.

Instances

Instances details
Eq a => Eq (LoadOp a) Source # 
Instance details

Defined in WGPU.Internal.RenderPass

Methods

(==) :: LoadOp a -> LoadOp a -> Bool #

(/=) :: LoadOp a -> LoadOp a -> Bool #

Show a => Show (LoadOp a) Source # 
Instance details

Defined in WGPU.Internal.RenderPass

Methods

showsPrec :: Int -> LoadOp a -> ShowS #

show :: LoadOp a -> String #

showList :: [LoadOp a] -> ShowS #

data StoreOp Source #

Operation to perform to the output attachment at the end of the render pass.

Constructors

StoreOpStore

Store the result.

StoreOpClear

Discard the result.

Instances

Instances details
Eq StoreOp Source # 
Instance details

Defined in WGPU.Internal.RenderPass

Methods

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

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

Show StoreOp Source # 
Instance details

Defined in WGPU.Internal.RenderPass

ToRaw StoreOp WGPUStoreOp Source # 
Instance details

Defined in WGPU.Internal.RenderPass

data Operations a Source #

Constructors

Operations 

Fields

Instances

Instances details
Eq a => Eq (Operations a) Source # 
Instance details

Defined in WGPU.Internal.RenderPass

Methods

(==) :: Operations a -> Operations a -> Bool #

(/=) :: Operations a -> Operations a -> Bool #

Show a => Show (Operations a) Source # 
Instance details

Defined in WGPU.Internal.RenderPass

data RenderPassColorAttachment Source #

Describes a color attachment to a render pass.

Constructors

RenderPassColorAttachment 

Fields

data RenderPassDescriptor Source #

Describes the attachments of a render pass.

Constructors

RenderPassDescriptor 

Fields

data Range a Source #

Half open range. It includes the start value but not the end value.

Constructors

Range 

Fields

Instances

Instances details
Eq a => Eq (Range a) Source # 
Instance details

Defined in WGPU.Internal.RenderPass

Methods

(==) :: Range a -> Range a -> Bool #

(/=) :: Range a -> Range a -> Bool #

Show a => Show (Range a) Source # 
Instance details

Defined in WGPU.Internal.RenderPass

Methods

showsPrec :: Int -> Range a -> ShowS #

show :: Range a -> String #

showList :: [Range a] -> ShowS #

Functions

beginRenderPass Source #

Arguments

:: MonadIO m 
=> CommandEncoder

CommandEncoder to contain the render pass.

-> RenderPassDescriptor

Description of the render pass.

-> m RenderPassEncoder

IO action which returns the render pass encoder.

Begins recording of a render pass.

renderPassSetPipeline Source #

Arguments

:: MonadIO m 
=> RenderPassEncoder

Render pass encoder on which to act.

-> RenderPipeline

Render pipeline to set active.

-> m ()

IO action which sets the active render pipeline.

Sets the active render pipeline.

Subsequent draw calls will exhibit the behaviour defined by the pipeline.

renderPassSetBindGroup :: MonadIO m => RenderPassEncoder -> Word32 -> BindGroup -> Vector Word32 -> m () Source #

Sets the active bind group for a given bind group index.

renderPassSetIndexBuffer :: MonadIO m => RenderPassEncoder -> Buffer -> IndexFormat -> Word64 -> Word64 -> m () Source #

Sets the active index buffer.

renderPassSetVertexBuffer :: MonadIO m => RenderPassEncoder -> Word32 -> Buffer -> Word64 -> Word64 -> m () Source #

Assign a vertex buffer to a slot.

renderPassDraw Source #

Arguments

:: MonadIO m 
=> RenderPassEncoder

Render pass encoder on which to act.

-> Range Word32

Range of vertices to draw.

-> Range Word32

Range of instances to draw.

-> m ()

IO action which stores the draw command.

Draws primitives from the active vertex buffers.

endRenderPass Source #

Arguments

:: MonadIO m 
=> RenderPassEncoder

Render pass encoder on which to finish recording.

-> m ()

IO action that finishes recording.

Finish recording of a render pass.