keid-render-basic-0.1.1.4: Basic rendering programs for Keid engine.
Safe HaskellNone
LanguageHaskell2010

Render.Unlit.Textured.Model

Synopsis

Documentation

type Model buf = Indexed buf Packed VertexAttrs Source #

type VertexAttrs = "uv" ::: Vec2 Source #

vkVertexAttrs :: [Format] Source #

data InstanceAttrs Source #

Data for a single element.

Instances

Instances details
Zero InstanceAttrs Source # 
Instance details

Defined in Render.Unlit.Textured.Model

type StorableAttrs = (Vector TextureParams, Vector Transform) Source #

Intermediate data to be shipped.

data InstanceBuffers textureStage transformStage Source #

GPU-bound data.

Constructors

InstanceBuffers 

Fields

Instances

Instances details
HasVertexBuffers (InstanceBuffers textureStage transformStage) Source # 
Instance details

Defined in Render.Unlit.Textured.Model

Associated Types

type VertexBuffersOf (InstanceBuffers textureStage transformStage)

Methods

getVertexBuffers :: InstanceBuffers textureStage transformStage -> [Buffer]

getInstanceCount :: InstanceBuffers textureStage transformStage -> Word32

type VertexBuffersOf (InstanceBuffers textureStage transformStage) Source # 
Instance details

Defined in Render.Unlit.Textured.Model

type VertexBuffersOf (InstanceBuffers textureStage transformStage) = InstanceAttrs

allocateInstancesWith :: (MonadResource m, MonadUnliftIO m) => (BufferUsageFlagBits -> Int -> Vector TextureParams -> m (InstanceTexture texture)) -> (BufferUsageFlagBits -> Int -> Vector Transform -> m (InstanceTransform transform)) -> (forall stage a. Allocated stage a -> m ()) -> [InstanceAttrs] -> m (ReleaseKey, InstanceBuffers texture transform) Source #

allocateInstancesCoherent :: (MonadReader env m, HasVulkan env, MonadResource m, MonadUnliftIO m) => [InstanceAttrs] -> m (ReleaseKey, InstanceBuffers 'Coherent 'Coherent) Source #

allocateInstancesCoherent_ :: HasVulkan env => Int -> ResourceT (RIO env) (InstanceBuffers 'Coherent 'Coherent) Source #

updateCoherentResize_ :: (HasVulkan context, MonadUnliftIO m) => context -> InstanceBuffers 'Coherent 'Coherent -> (Vector TextureParams, Vector Transform) -> m (InstanceBuffers 'Coherent 'Coherent) Source #