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