keid-core-0.1.9.0: Core parts of Keid engine.
Safe HaskellSafe-Inferred
LanguageGHC2021

Resource.Texture

Synopsis

Documentation

data Texture tag Source #

Constructors

Texture 

Fields

Instances

Instances details
HasField "size" (Texture tag) Vec2 Source # 
Instance details

Defined in Resource.Texture

Methods

getField :: Texture tag -> Vec2 #

Show (Texture tag) Source # 
Instance details

Defined in Resource.Texture

Methods

showsPrec :: Int -> Texture tag -> ShowS #

show :: Texture tag -> String #

showList :: [Texture tag] -> ShowS #

Texture types

data Flat Source #

Instances

Instances details
TextureLayers Flat Source # 
Instance details

Defined in Resource.Texture

data CubeMap Source #

Instances

Instances details
TextureLayers CubeMap Source # 
Instance details

Defined in Resource.Texture

data ArrayOf (layers :: Nat) Source #

Instances

Instances details
KnownNat n => TextureLayers (ArrayOf n :: Type) Source # 
Instance details

Defined in Resource.Texture

class TextureLayers a where Source #

Number of expected texture layers to load from resource.

Instances

Instances details
TextureLayers CubeMap Source # 
Instance details

Defined in Resource.Texture

TextureLayers Flat Source # 
Instance details

Defined in Resource.Texture

KnownNat n => TextureLayers (ArrayOf n :: Type) Source # 
Instance details

Defined in Resource.Texture

Utilities

type TextureLoader m layers = Format -> Queues CommandPool -> FilePath -> m (Texture layers) Source #

createImageView :: (MonadIO io, HasVulkan context) => context -> Image -> Format -> ("mip levels" ::: Word32) -> ("array layers" ::: Word32) -> io ImageView Source #

withSize2d :: Num i => (i -> i -> a) -> Texture tag -> a Source #

withSize3d :: Num i => (i -> i -> i -> a) -> Texture tag -> a Source #