bitmap-opengl-0.0.1.5: OpenGL support for Data.Bitmap.

Safe HaskellNone

Data.Bitmap.OpenGL

Description

OpenGL support for Data.Bitmap

Synopsis

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