GPipe-TextureLoad-1.0.4: Load GPipe textures from filesystem

Safe HaskellSafe-Infered

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

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.

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

Arguments

:: Int

The depth of the resulting Texture3D

-> f 
-> FilePath 
-> IO (Texture3D f)