Safe Haskell | None |
---|
OpenGL support for Data.Bitmap
- makeSimpleBitmapTexture :: forall s. PixelComponent s => Bitmap s -> IO TextureObject
- makeTextureFromBitmap :: (PixelComponent s, TwoDimensionalTextureTarget target) => Bitmap s -> target -> Level -> PixelFormat -> PixelInternalFormat -> Border -> IO TextureObject
- texImageFromBitmap :: forall s target. (PixelComponent s, TwoDimensionalTextureTarget target) => Bitmap s -> target -> Level -> PixelFormat -> PixelInternalFormat -> Border -> IO ()
Documentation
makeSimpleBitmapTexture :: forall s. PixelComponent s => Bitmap s -> IO TextureObjectSource
This function guesses the pixel format from the number of channels:
- 1 ~> Intensity
- 2 ~> Luminance, Alpha
- 3 ~> RGB
- 4 ~> RGBA
For more control, use makeTextureFromBitmap
.
makeTextureFromBitmap :: (PixelComponent s, TwoDimensionalTextureTarget target) => Bitmap s -> target -> Level -> PixelFormat -> PixelInternalFormat -> Border -> IO TextureObjectSource
Creates a new OpenGL texture from a bitmap
texImageFromBitmap :: forall s target. (PixelComponent s, TwoDimensionalTextureTarget target) => Bitmap s -> target -> Level -> PixelFormat -> PixelInternalFormat -> Border -> IO ()Source