ktx-codec-0.0.2.1: Khronos texture format
Safe HaskellSafe-Inferred
LanguageHaskell2010

Codec.Ktx2.Level

Synopsis

Documentation

data Level Source #

Constructors

Level 

Fields

  • byteOffset :: Word64

    The offset from the start of the file of the first byte of image data for mip level. It is the offset of the first byte after any mipPadding.

  • byteLength :: Word64

    The total size of the data for supercompressed mip level.

  • uncompressedByteLength :: Word64

    the number of bytes of pixel data in LOD level after reflation from supercompression. This includes all z slices, all faces, all rows (or rows of blocks) and all pixels (or blocks) in each row for the mipmap level. When supercompressionScheme == 0, byteLength must have the same value as this. When supercompressionScheme == 1 (BasisLZ) the value must be 0.

Instances

Instances details
Generic Level Source # 
Instance details

Defined in Codec.Ktx2.Level

Associated Types

type Rep Level :: Type -> Type #

Methods

from :: Level -> Rep Level x #

to :: Rep Level x -> Level #

Show Level Source # 
Instance details

Defined in Codec.Ktx2.Level

Methods

showsPrec :: Int -> Level -> ShowS #

show :: Level -> String #

showList :: [Level] -> ShowS #

Binary Level Source # 
Instance details

Defined in Codec.Ktx2.Level

Methods

put :: Level -> Put #

get :: Get Level #

putList :: [Level] -> Put #

Eq Level Source # 
Instance details

Defined in Codec.Ktx2.Level

Methods

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

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

type Rep Level Source # 
Instance details

Defined in Codec.Ktx2.Level

type Rep Level = D1 ('MetaData "Level" "Codec.Ktx2.Level" "ktx-codec-0.0.2.1-AFX5voQ2mUt7MGimSGTUau" 'False) (C1 ('MetaCons "Level" 'PrefixI 'True) (S1 ('MetaSel ('Just "byteOffset") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Word64) :*: (S1 ('MetaSel ('Just "byteLength") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Word64) :*: S1 ('MetaSel ('Just "uncompressedByteLength") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Word64))))

index :: Word64 -> [(Maybe Word64, ByteString)] -> Vector Level Source #

Build a level index from level data.

Levels should be placed from largest (mip 0) to smallest.