License | BSD3 |
---|---|
Maintainer | ziocroc@gmail.com |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
- class (MonadGL m, GLES) => MonadTexture m
- data Texture
- mkTexture :: GLES => Int -> Int -> TextureParameters -> [[Color]] -> Texture
- mkTextureFloat :: GLES => Int -> Int -> TextureParameters -> [Vec4] -> Texture
- mkTextureRaw :: GLES => Int -> Int -> TextureParameters -> [UInt8Array] -> Int -> Texture
- colorTex :: GLES => Color -> Texture
- data TextureParameters
- data Filter
- data WrappingFunction
- parameters :: Filter -> Filter -> TextureParameters
- potParameters :: (Filter, Maybe Filter) -> Filter -> Bool -> WrappingFunction -> WrappingFunction -> TextureParameters
- potLinear :: Bool -> TextureParameters
Documentation
class (MonadGL m, GLES) => MonadTexture m Source #
getTexture, getActiveTexturesCount, setActiveTexturesCount, newTexture, unusedTextures
GLES => MonadTexture (Draw o) Source # | |
:: GLES | |
=> Int | Width. |
-> Int | Height. |
-> TextureParameters | |
-> [[Color]] | List of pixels, one for each level of detail. The first element is the base image level, the second image is half the size of the base, and so on. Use just one level of detail if you don't want mipmaps, or you used True in the previous argument. |
-> Texture |
Creates a Texture
from a list of pixels.
Creates a float Texture
from a list of vectors.
:: GLES | |
=> Int | Width. |
-> Int | Height. |
-> TextureParameters | |
-> [UInt8Array] | Array of pixel components, one for each level of detail. |
-> Int | Hash of the arrays |
-> Texture |
Parameters
data WrappingFunction Source #
:: Filter | Minification filter |
-> Filter | Magnification filter |
-> TextureParameters |
Create a TextureParameters
.
:: (Filter, Maybe Filter) | Minification filter. |
-> Filter | Magnification filter. |
-> Bool | Generate mipmaps automatically. |
-> WrappingFunction | Horizontal wrapping function. |
-> WrappingFunction | Vertical wrapping function. |
-> TextureParameters |
This function provides more features than parameters
, but, on WebGL, the
resulting TextureParameters
will not work with textures whose width or
height is not a power of two.
:: Bool | Generate mipmaps |
-> TextureParameters |
potParameters
with linear filters and repeat.