ombra-0.3.0.0: Render engine.

Safe HaskellNone
LanguageHaskell2010

Graphics.Rendering.Ombra.Texture

Synopsis

Documentation

data Texture Source #

A texture.

Instances

mkTexture Source #

Arguments

:: GLES 
=> Int

Width. Must be a power of two.

-> Int

Height. Must be a power of two.

-> Bool

Generate mipmaps automatically.

-> [[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.

mkTextureFloat Source #

Arguments

:: GLES 
=> Int

Width.

-> Int

Height.

-> [Vec4]

List of vectors.

-> Texture 

Creates a float Texture from a list of vectors.

mkTextureRaw Source #

Arguments

:: GLES 
=> Int

Width.

-> Int

Height.

-> Bool

Generate mipmaps.

-> [UInt8Array]

Array of pixel components, one for each level of detail.

-> Int

Texture hash

-> Texture 

data Filter Source #

Constructors

Linear

Average of the four nearest pixels.

Nearest

Nearest pixel.

Instances

Eq Filter Source # 

Methods

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

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

setFilter Source #

Arguments

:: (Filter, Maybe Filter)

Minification filter and mipmap filter.

-> Filter

Magnification filter.

-> Texture 
-> Texture 

Change the Texture minifying and magnifying functions. This doesn't work on sublayer textures.

colorTex :: GLES => Color -> Texture Source #

Generate a 1x1 texture.