opengles-0.8.3: Functional interface for OpenGL 4.1+ and OpenGL ES 2.0+

Safe HaskellNone
LanguageHaskell2010

Graphics.TextureContainer.KTX

Description

Ktx is the only format can handle all sorts of textures available among OpenGL [ES] implementations. This library holds any Texture as Ktx internally.

Synopsis

Documentation

data Ktx Source

Constructors

Ktx 

Fields

ktxName :: FilePath

Debug purpose

ktxContent :: ByteString

Holding the original ForeignPtr.

ktxGlType :: Word32
 
ktxGlTypeSize :: Word32
 
ktxGlFormat :: Word32
 
ktxGlInternalFormat :: Word32
 
ktxGlBaseInternalFormat :: Word32
 
ktxPixelWidth :: Word32
 
ktxPixelHeight :: Word32
 
ktxPixelDepth :: Word32
 
ktxNumElems :: Word32
 
ktxNumFaces :: Word32
 
ktxNumMipLevels :: Word32
 
ktxMap :: [(ByteString, ByteString)]

[(utf8 string, any)] Note that if the value is utf8, it includes NULL terminator.

ktxImage :: [[ByteString]]
 

Instances

ktxFromFile :: FilePath -> IO Ktx Source

Build Ktx from given path.

readKtx :: FilePath -> ByteString -> Ktx Source

Build Ktx with arbitrary resource name and actual data.

tryKtx :: FilePath -> ByteString -> Either SomeException Ktx Source

Same as readKtx except error handling is explicit.