GPipe-TextureLoad-1.0.0: Load GPipe textures from filesystemSource codeContentsIndex
Graphics.GPipe.Texture.Load
Description
This module provides the means to load all kinds of textures from file. It's based on the stb-image package, and inherits its strengths and limitations. Specifically, it handles a subset of the JPEG, PNG, TGA, BMP and PSD file formats, but is not entirely thread safe. See http://hackage.haskell.org/package/stb-image for more information.
Synopsis
class Texture t => LoadableTexture t where
loadTexture :: TextureFormat t -> FilePath -> IO t
class LoadableTexture3D f where
loadTexture3D :: Int -> f -> FilePath -> IO (Texture3D f)
Documentation
class Texture t => LoadableTexture t whereSource

Provides the general way of loading any kind of textures. A 3D texture is assumed to be an array of square images tiled vertically in the image file. Cube textures are assumed to be composed of 6 equally sized images tiled vertically. No additional mipmaps are loaded.

Filesystem errors or bad texture dimensions (e.g. loading a cube texture from a file where the height is not a multiple of 6) are thrown as IOErrors.

Methods
loadTexture :: TextureFormat t -> FilePath -> IO tSource
show/hide Instances
class LoadableTexture3D f whereSource

Provides an alternative way of loading Texture3Ds that are arrays of non-square images tiled vertically. No additional mipmaps are loaded.

Filesystem errors or bad texture dimensions (i.e. the height of the image is not a multiple of the supplied depth) are thrown as IOErrors.

Methods
loadTexture3DSource
:: IntThe depth of the resulting Texture3D
-> f
-> FilePath
-> IO (Texture3D f)
show/hide Instances
Produced by Haddock version 2.4.2