| Safe Haskell | Safe-Infered |
|---|
Graphics.GLUtil.Textures
Description
Utilities for loading texture data.
- data TexColor
- data TexInfo a = TexInfo {}
- texInfo :: Int -> Int -> TexColor -> a -> TexInfo a
- class Storable a => HasGLType a where
- class HasGLType (Elem a) => IsPixelData a where
- newtype ShortString = ShortString ByteString
- loadTexture :: IsPixelData a => TexInfo a -> IO TextureObject
- reloadTexture :: forall a. IsPixelData a => TextureObject -> TexInfo a -> IO ()
Documentation
A basic texture information record.
class HasGLType (Elem a) => IsPixelData a whereSource
Class for containers of texture data.
Instances
| IsPixelData ByteString | |
| IsPixelData ShortString | |
| HasGLType b => IsPixelData [b] | |
| HasGLType b => IsPixelData (Ptr b) | |
| HasGLType b => IsPixelData (ForeignPtr b) | |
| HasGLType b => IsPixelData (Vector b) | |
| HasGLType b => IsPixelData (StorableArray i b) |
newtype ShortString Source
Wrapper whose IsPixelData instance treats the pointer underlying
a ByteString as an array of Word16s.
Constructors
| ShortString ByteString |
Instances
loadTexture :: IsPixelData a => TexInfo a -> IO TextureObjectSource
Create a new 2D texture with data from a TexInfo.
reloadTexture :: forall a. IsPixelData a => TextureObject -> TexInfo a -> IO ()Source
Replace a 2D texture's pixel data with data from a TexInfo.